SynPlus 2.X
Moderators: Hacker, petermad, Stefan2, white
mod_sample.rar
Can someone please compile the Delphi sources of mod_sample.rar and put the compiled library online? Thanks!
Last edited by tbeu on 2007-08-13, 09:56 UTC, edited 1 time in total.
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
About SynPlus internal plugins (API Vs 1.2)
1) It is not a good idea to use the Delphi String type (in structure ModInfo) for the interface as there is no equivalent type in C/C++.
2) Is there a chance to get the file name / file pointer of the active file?
3) What is the meaning of the third parameter (pSynPlusStr) of InitializeModule()?
4) The bitmap returned by GetMenuBitmap() never shows up in the menu of SynPlus.
This is my C/C++ example code.
2) Is there a chance to get the file name / file pointer of the active file?
3) What is the meaning of the third parameter (pSynPlusStr) of InitializeModule()?
4) The bitmap returned by GetMenuBitmap() never shows up in the menu of SynPlus.
This is my C/C++ example code.
Code: Select all
HINSTANCE hinstance;
typedef struct
{
char ModName[50];
BOOL Autoload;
BOOL Editor;
} ModInfo;
HBITMAP __stdcall GetMenuBitmap()
{
return (HBITMAP) LoadImage(hinstance, MAKEINTRESOURCE(LOGO), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR);
}
BOOL __stdcall GetModuleInfo(ModInfo* Info)
{
strcpy(Info->ModName, "My Module");
Info->Autoload = TRUE;
Info->Editor = FALSE;
return TRUE;
}
DWORD __stdcall InitializeModule(HWND MainWND, HWND PluginWND, char* pSynPlusStr, int SelStart, int SelEnd)
{
return MAKELONG(0,0);
}
void __stdcall SetApiVer(DWORD ApiVer)
{
/*
WORD l = LOWORD(ApiVer);
WORD h = HIWORD(ApiVer);
*/
}
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
switch (fdwReason)
{
case DLL_PROCESS_ATTACH :
hinstance = hinstDLL;
DisableThreadLibraryCalls(hinstDLL);
break;
case DLL_PROCESS_DETACH :
break;
}
return TRUE;
}
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
2tbeu
function SetNewFile(PluginWND:HWND;fName:PChar):
function GetMenuBitmap: HBITMAP; stdcall;
begin
result:=LoadImage(hinstance, 'LOGO', IMAGE_BITMAP , 0, 0,LR_DEFAULTCOLOR );
end;
Image 'LOGO' - resourche in your module, must be Bitmap 16x16
Possible you rightIt is not a good idea to use the Delphi String type (in structure ModInfo) for the interface as there is no equivalent type in C/C++
At opening file SynPlus will send name of new file, call) Is there a chance to get the file name / file pointer of the active file?
function SetNewFile(PluginWND:HWND;fName:PChar):
Pointer on opened in SynPlus text.What is the meaning of the third parameter (pSynPlusStr) of InitializeModule()?
My sampleWhat is the meaning of the third parameter (pSynPlusStr) of InitializeModule()?
function GetMenuBitmap: HBITMAP; stdcall;
begin
result:=LoadImage(hinstance, 'LOGO', IMAGE_BITMAP , 0, 0,LR_DEFAULTCOLOR );
end;
Image 'LOGO' - resourche in your module, must be Bitmap 16x16
About SynPlus internal plugins (API Vs 1.2)
1) When exactly is SetNewFile() called? Does the plugin need to call this function itself?
2) When debugging a C/C++ plugin in InitializeModule() I notice that pSynPlusStr is never a valid char pointer.
3) I installed comments.dll, executer.dll, fileprop.dll, listsort.dll, shot.dll and translit.dll. The bitmap of neither plugin shows up in the menu of SynPlus.
4) I use SynPlus to show thumbnails of text files. If the text to displayed is less in size than the thumbnail display sometimes an invalid text is appended. See my video.
2) When debugging a C/C++ plugin in InitializeModule() I notice that pSynPlusStr is never a valid char pointer.
3) I installed comments.dll, executer.dll, fileprop.dll, listsort.dll, shot.dll and translit.dll. The bitmap of neither plugin shows up in the menu of SynPlus.
4) I use SynPlus to show thumbnails of text files. If the text to displayed is less in size than the thumbnail display sometimes an invalid text is appended. See my video.
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
lost Window Focus to quit SynPlus usign CTRL-Q
First of all thanks alot 4 SynPlus. I use it since hpg_ed is unsupported. But one thing is annoying me a bit: You can open SynPlus in a TCmd window using CTRL-Q (quickview). But then you cannot close it anymore with CTRL-Q, after editing some text, you first have to click on the source window and then CTRL-Q. The Button for quickview from the buttonbar is not affected.
Last edited by FrankCH on 2008-05-16, 15:19 UTC, edited 1 time in total.
Textfile-encoding: PC/Ansi or UNIX/LINUX
Files can only be saved in PC/Ansi encoded format. That means each line is terminated with carriage-return and line-feed character. UNIX/Linux only uses carriage-return. Could you offer an option in the 'save as' dialog?
Re: Textfile-encoding: PC/Ansi or UNIX/LINUX
WrongFrankCH wrote:Files can only be saved in PC/Ansi encoded format. That means each line is terminated with carriage-return and line-feed character. UNIX/Linux only uses carriage-return. Could you offer an option in the 'save as' dialog?
Unix / Linux uses only line-feed !
-
- Junior Member
- Posts: 9
- Joined: 2008-06-19, 21:51 UTC
Location of config file
How can I change location of SynPlus config file?
Currently config file is stored in the plug-in's directory ([face=courier]c:\Program Files\TotalCmd\plugins\wlx\synPlus[/face]). It works correctly in Windows XP (and earlier), but under Vista applications aren't allowed to store any data in the [face=courier]Program Files[/face] folders (it's possible but require some special actions in the application).
I tired to select User profile directory in the plug-in's settings but it doesn't work for me -- plug-in still try to store configuration in the SynPlus directory.
Currently config file is stored in the plug-in's directory ([face=courier]c:\Program Files\TotalCmd\plugins\wlx\synPlus[/face]). It works correctly in Windows XP (and earlier), but under Vista applications aren't allowed to store any data in the [face=courier]Program Files[/face] folders (it's possible but require some special actions in the application).
I tired to select User profile directory in the plug-in's settings but it doesn't work for me -- plug-in still try to store configuration in the SynPlus directory.

- Clas Hortien
- Senior Member
- Posts: 200
- Joined: 2003-03-03, 15:03 UTC
Hi,
i need some help for the highlighting in synplus. First of all i'd like to create a highlighter that will be used if no other matching highlighter can be found. Especially for files with no extension. How can i do that ?
Furthermore do i need a rule to highlight all rows that starts with a the string "C " (no quotation marks). I tried to implement this in an existing highligher, but i was not able to get it to work.
Many thanks for your help
Clas
i need some help for the highlighting in synplus. First of all i'd like to create a highlighter that will be used if no other matching highlighter can be found. Especially for files with no extension. How can i do that ?
Furthermore do i need a rule to highlight all rows that starts with a the string "C " (no quotation marks). I tried to implement this in an existing highligher, but i was not able to get it to work.
Many thanks for your help
Clas
#14041
- Clas Hortien
- Senior Member
- Posts: 200
- Joined: 2003-03-03, 15:03 UTC
I cannot get synplus 2.7.1 to highlight python.
I have in my .ini:
PY=python.hgl
but it shows with no highlighting.
The rules (and example) seem to be ok when I run a file in the highlighters folders called highlighting.exe
I do have a python.hgl file, not sure where I got it from.
Any idea what to test next?
Thanks
I have in my .ini:
PY=python.hgl
but it shows with no highlighting.
The rules (and example) seem to be ok when I run a file in the highlighters folders called highlighting.exe
I do have a python.hgl file, not sure where I got it from.
Any idea what to test next?
Thanks
SynPlus Settings use black text on black background
Hi!
I've installed SynPlus 2.7.3 on Windows Vista using the default Aero theme. It works fine, however, the settings dialog is displayed using black text on black background, which is kind of hard to read
When I'm using the classic Windows XP theme the settings dialog is displayed fine - but I don't want to switch the theme every time I need to change the settings.
Is this a problem of TotalCommander, or a problem of the plugin? I've never seen such a problem with other plugins, or with other tools.
Best regards,
hensz
I've installed SynPlus 2.7.3 on Windows Vista using the default Aero theme. It works fine, however, the settings dialog is displayed using black text on black background, which is kind of hard to read

Is this a problem of TotalCommander, or a problem of the plugin? I've never seen such a problem with other plugins, or with other tools.
Best regards,
hensz