Can I subclass the window procedure of Lister?

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
nyam
Member
Member
Posts: 175
Joined: 2003-06-09, 11:55 UTC
Location: Seoul, Korea
Contact:

Can I subclass the window procedure of Lister?

Post by *nyam »

Dear Ghisler,

Always thanks for your work.

I want to subclass the Lister's window procedure to remove flickering background of lister plugin.

So I subclassed the Lister's window procedure in ListLoad.
And the subclassed window procedure processes the WM_ERASEBKGND with only 'return TRUE;'.
(It seems to use WM_ERASEBKGND message rather than hbrBackground member of WNDCLASS.)

But The window procedure seems to be changed after ListLoad returns.
(The after window procedure seems to process the WM_ERASEBKGND with the Lister color.)
(I noticed the address of window procedure is 0x4???????. not a subclassed DLL image base address. (0x1???????) )

How can I subclass the Lister's window procedure?
Or is there any other solution?
(To do nothing when painting background. (WM_ERASEBKGND) )
User avatar
Hacker
Moderator
Moderator
Posts: 13144
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Maybe a search for "subclass" might help?

HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
VadiMGP
Power Member
Power Member
Posts: 672
Joined: 2003-04-05, 12:11 UTC
Location: Israel

Post by *VadiMGP »

But The window procedure seems to be changed after ListLoad returns.
Exactly. Actually Lister subclass your window created on ListLoad.
nyam
Member
Member
Posts: 175
Joined: 2003-06-09, 11:55 UTC
Location: Seoul, Korea
Contact:

Post by *nyam »

VadiMGP wrote:
But The window procedure seems to be changed after ListLoad returns.
Exactly. Actually Lister subclass your window created on ListLoad.
Thanks, but I already know that.

I told about the main 'Lister window'.
nyam
Member
Member
Posts: 175
Joined: 2003-06-09, 11:55 UTC
Location: Seoul, Korea
Contact:

Post by *nyam »

Hacker wrote:Maybe a search for "subclass" might help?

HTH
Roman
That helps me for many things.
Thank you Hacker.
VadiMGP
Power Member
Power Member
Posts: 672
Joined: 2003-04-05, 12:11 UTC
Location: Israel

Post by *VadiMGP »

I told about the main 'Lister window'.
Ah, I see.
Just don't forget about Ctrl+Q. This case may require some special processing because lister window is child of TC panel.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50834
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

You should be very careful with that, because other programs also start to use Total Commander plugins, even from myself (standalone lister).
Author of Total Commander
https://www.ghisler.com
Post Reply