Problem developping a WCX Plugin GUI in Delphi

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

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
franck8244
Power Member
Power Member
Posts: 704
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Problem developping a WCX Plugin GUI in Delphi

Post by *franck8244 »

I'm writting a wcx packer plugin that will be able to retrieve wdx info from file and save them in a text file...
The "engine" work but I have a bug with the GUI !

Here is my problem :

1- Open a TC (ini file "empty" except with this plugin : for debugging)
2- Alt+F5 (after selecting files) -> The Pack Dialog opens
3- Pressing Configure the Plugin->Open my GUI (On this GUI I have a button to close it :) , )
4- Pressing the Close Button->"I" return to the Packing options

Repeating 3 & 4 works fine (my GUI is opened and closed) ...

doing 1 - 2 - 3 - 4 then Cancelling->the Pack dialog is closed then doing 2 - 3 throw an exception : System Error Code 1400 : invalid Window handle

I can provide my "testing this problem" source
If someone can help ...
Thanks
TC#88260 -
User avatar
Sheridan
Junior Member
Junior Member
Posts: 12
Joined: 2005-03-17, 09:47 UTC
Location: Russia, South
Contact:

Post by *Sheridan »

can you post code where you create and destroy a Configure window?
My profile on rsdn.ru
Apologize for bad english...
User avatar
franck8244
Power Member
Power Member
Posts: 704
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 »

I'll post link to this source as soon as I can , I have not the time yet .

Short explanations:
Creating my Gui in ConfigurePacker :
MyForm:=MyClass.CreateParented(ParentHandle);
MyForm.show
button to close it : Self.close

The place of the "MyForm.show" can be in the OnCreate procedure, the result is the same

I used Procfs.wfx (from another TC instance) to see if my form was still existing (and a new one was creating each time) but there is only one gui at the same time (the form is truly closed (not hide) then recreated)

I also tried to place my Gui in a separate DLL and calling it with getprocadress but the result is the same :(


Anyway, I'll give link soon :)
TC#88260 -
User avatar
Sheridan
Junior Member
Junior Member
Posts: 12
Joined: 2005-03-17, 09:47 UTC
Location: Russia, South
Contact:

Post by *Sheridan »

My profile on rsdn.ru
Apologize for bad english...
User avatar
franck8244
Power Member
Power Member
Posts: 704
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 »

I have tried to send WM_PARENTNOTIFY but the result is the same :(

Here is my problem with the smallest gui (1 button on a form) to test this problem...

Here with my "full" form
(The Button to close the form is "Button2")
TC#88260 -
User avatar
Sheridan
Junior Member
Junior Member
Posts: 12
Joined: 2005-03-17, 09:47 UTC
Location: Russia, South
Contact:

Post by *Sheridan »

im make programs int c++builder6... :)
Ghm... First. You certain that your FindWindow fuction find a yor wnd Parent? Or into your wcx you send a message to Form.....->Parent->Handle (or to stored handle from ConfigurePacker)?
My profile on rsdn.ru
Apologize for bad english...
User avatar
franck8244
Power Member
Power Member
Posts: 704
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 »

I tried this morning : the FindWindow function find the correct Parent Handle... :(
TC#88260 -
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50830
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Hmm, my guess is that Delphi/C++ Builder is doing something strange in the CreateParented method. Could you try instead with a normal "Create" and then a ShowModal or so?
Author of Total Commander
https://www.ghisler.com
User avatar
franck8244
Power Member
Power Member
Posts: 704
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 »

ghisler(Author) wrote:Could you try instead with a normal "Create" and then a ShowModal or so?
Thanks, the simple create works like a charm :wink:
I'll use my GUI (and other functions) in a separate dll to improve the loading time of the wcx :D
TC#88260 -
Post Reply