Trying to develop a FS plugin

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

User avatar
fg_2002fr
Senior Member
Senior Member
Posts: 267
Joined: 2003-02-24, 10:12 UTC
Location: Tours (France)
Contact:

Post by *fg_2002fr »

Hi Christian,

I posted the source of dircpy on my site. it is a very basic packer but everybody could be use it to make MFC lister, packer or filesystem.

you can download it here :
http://physio-a.univ-tours.fr/tcplugins/wcx_dircpy103_src.zip
size : 21ko
djorge
Senior Member
Senior Member
Posts: 422
Joined: 2003-07-03, 12:48 UTC
Location: Portugal

Post by *djorge »

Where did you include windows.h?
You are right. I have deleted the line which includes windows.h and the error has gone.

But then another error arised. The complier tells me that there are two DllMain defined.

As fg_2002fr told me (in topic http://www.ghisler.ch/board/viewtopic.php?t=4147&start=0&postdays=0&postorder=asc&highlight=), if i want to create a MFC based plugin, it is better to create a MFC Dll with Visual studio wizard, and copy the exported functions and the other stuff. I haven't try yet due to my spare time...

As ghisler said, it would be easier to beginners (like me) if a MFC plugin source was provided. It will avoid such "work arounds".

Regards,
djorge
User avatar
tbeu
Power Member
Power Member
Posts: 1354
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Post by *tbeu »

Hello plug-in and MFC developers,

how to create a modeless MFC child dialog inside a lister plug-in (WLX)?

In ListLoad() I do

Code: Select all

__declspec(dllexport) HWND __stdcall ListLoad(HWND ParentWin, char* FileToLoad, int ShowFlags)
{
  CMyDlg dlg(CWnd::FromHandle(ParentWin));
  theApp.m_pMainWnd = &dlg;
  dlg.Create(IDD_MY_DLG, CWnd::FromHandle(ParentWin));
  dlg.ShowWindow(SW_SHOW);
  return dlg.m_hWnd;
}
but this does not seem to work since I get an empty lister window. If I debug inside ListLoad() I can see that dlg.m_hWnd is not NULL and the dialog is correctly placed inside the lister window. But after leaving ListLoad() my dlg has gone.

Any help is appreciated. Thanks.
tbeu
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
User avatar
fg_2002fr
Senior Member
Senior Member
Posts: 267
Joined: 2003-02-24, 10:12 UTC
Location: Tours (France)
Contact:

Post by *fg_2002fr »

Hello tbeu,

seems that "dlg" is a local variable. try instead

CMyDlg *dlg;
...
dlg = new CMyDlg(...);
dlg->Create(...);
...
return dlg->GetSafeHwnd();
Post Reply