[Development] External WLX plugins loader

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
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

2poiuytr
Oh, I misunderstood you.
I thought that you suggested to pass Form Window's handle to ListLoad. But you just suggested to position plugin window properly.
poiuytr
Senior Member
Senior Member
Posts: 243
Joined: 2003-02-23, 17:33 UTC

Post by *poiuytr »

Alextp wrote:Oh, I misunderstood you.
I thought that you suggested to pass Form Window's handle to ListLoad. But you just suggested to position plugin window properly.
Both are true! Use your MainForm as a parent to plugin's window (that will force Imagine to show its toolbar) and position plugin's window over desired Panel. Both Panel and plugin's window will be children of the MainForm and you can control their Z-order and size freely.
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

Thanks for hint, implemented it.
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

2poiuytr
Please check does IniEd plugin unload correctly by your code. I'm getting AV on ListCloseWindow. Is the problem in plugin?

http://www.totalcmd.net/plugring/inied.html
poiuytr
Senior Member
Senior Member
Posts: 243
Joined: 2003-02-23, 17:33 UTC

Post by *poiuytr »

Alextp wrote:Please check does IniEd plugin unload correctly by your code. I'm getting AV on ListCloseWindow. Is the problem in plugin?
IniEd crashes with my project also. It seems to me that it is IniEd problem related to unproper stack memory usage/allocation or similar.
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

I have problems with Office.wlx too: it doesn't redraw on first call. I tried to call SendMessage(hWnd, WM_PAINT...), no sucess.

http://www.totalcmd.net/plugring/office.html
poiuytr
Senior Member
Senior Member
Posts: 243
Joined: 2003-02-23, 17:33 UTC

Post by *poiuytr »

Alextp wrote:I have problems with Office.wlx too: it doesn't redraw on first call. I tried to call SendMessage(hWnd, WM_PAINT...), no sucess.

http://www.totalcmd.net/plugring/office.html
Works like a charm here. Does plugin redraw its window after resizing it by mouse?
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

Works like a charm here. Does plugin redraw its window after resizing it by mouse?
Yes, after horizontal resizing.
Without resizing it draws empty space on the top of doc.

But now I wrote another WLX loader (with similar code): no problems in it... Strange...
poiuytr
Senior Member
Senior Member
Posts: 243
Joined: 2003-02-23, 17:33 UTC

Post by *poiuytr »

Alextp wrote:
Works like a charm here. Does plugin redraw its window after resizing it by mouse?
Yes, after horizontal resizing.
Without resizing it draws empty space on the top of doc.
So try to emulate resizing (SetWindowPos).
IMHO this problem is similar to Imagine's one (initial resizing).
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

2poiuytr
This (problem with office.wlx) is somehow solved in my second loader (ATViewer). Although I didn't change anything.

---------
Another question: can you confirm this TBeu's bugreport with your loader?:

http://ghisler.ch/board/viewtopic.php?p=90946#90946

I confirm it.
Are the problems in plugins?
poiuytr
Senior Member
Senior Member
Posts: 243
Joined: 2003-02-23, 17:33 UTC

Post by *poiuytr »

Alextp wrote:2poiuytr
This (problem with office.wlx) is somehow solved in my second loader (ATViewer). Although I didn't change anything.
It is more likely that something have been changed, but you just don't realize what exactly.
Another question: can you confirm this TBeu's bugreport with your loader?:

http://ghisler.ch/board/viewtopic.php?p=90946#90946
FileInfo works fine, SynPlus crashes inside ListLoad function.

You can easily check my loader by yourself, I have posted sources with compiled exe here.
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

It is more likely that something have been changed, but you just don't realize what exactly.
Of course...
FileInfo works fine, SynPlus crashes inside ListLoad function.
Well, FileInfo works fine but unloads with exception. :)

SynPlus: maybe you specified incorrect info in ListSetDefaultParams, e.g. API version number (I use 1.30).
Works fine here, only error in unloading.
You can easily check my loader by yourself, I have posted sources with compiled exe here.
Thanks. I have forgot about them.
poiuytr
Senior Member
Senior Member
Posts: 243
Joined: 2003-02-23, 17:33 UTC

Post by *poiuytr »

Well, FileInfo works fine but unloads with exception. :)
FileInfo handles all my impacts without a single crash. Respect to its author.
SynPlus: maybe you specified incorrect info in ListSetDefaultParams, e.g. API version number (I use 1.30).
Works fine here, only error in unloading.
I found it. I called ListLoad with ShowFlags = 0, but when I set it properly (lcp_* combination) SynPlus works just fine. No crashes on load and on unload also.

Here is sources and compiled exe to play with.
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

2poiuytr
Unload errors are fixed now. They were because I forgot to close plugin window before destroying form.

PS Little fix to your source: low DWORD of plugin version interface must be 50, not 5.
poiuytr
Senior Member
Senior Member
Posts: 243
Joined: 2003-02-23, 17:33 UTC

Post by *poiuytr »

PS Little fix to your source: low DWORD of plugin version interface must be 50, not 5.
Yep, that's true. Thanks!
Post Reply