Is the window Subclassed

Started by Grincheux, April 29, 2021, 01:49:52 PM

Previous topic - Next topic

Grincheux

How to know if a window is subclassed?
I compare the HINSTANCE of the wndclass structure with the one got with GetWindowLongPtrA.
The result is that no window is subclassed on my pc!


For my program, when I look at its results, I have many windows but I create only one!
If you have any idea.

John Z

Well I'm no expert - never found a need to subclass a window.  To do it you need to intentionally make changes, overriding the original so it is not done by itself, or accidentally, as far as I know.  Other than looking at code I don't know if there is a flag or property that indicates a subclassed window or control.

When I run your mGimp program which became Cfe, I count 6 windows before I even try to apply a filter.

John Z


Grincheux

Yes but with the last program it shows more...
This is the reason of my question.
Have a look you will be surprised.

John Z

OK you are talking about WiW not Cfe.  Running it now. So WiW looking at entries for WiW I see 39 'entries', using Pelles Process Viewer I see WiW using 36 DLL's doesn't seem unreasonable.

Every control is a window.  When I run Cfe then start WiW, WiW doesn't show the Cfe files in the Filename column.

I think I'm just lost here.   :(  No help to you on this.

John Z

Grincheux

John this is the part of my problem. I will add the possibility to list all the children and to hook the windows too. To be able to know what is behind.

John Z

#5
Is this helpful? "Determining if One Object's Class Is a Subclass of Another"

https://www.oreilly.com/library/view/c-cookbook/0596007612/ch08s08.html


John Z

Your post on MASM32 Form will probably get a good answer.  :)

Grincheux

Thank You John, but it is C++ and I don't understand. But it seems this not the solution. I have read many posts on it, they all compare the hInstance like I do. I continue to dig...

frankie

Try comparing the address of your subclassing procedure with the window stored address.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Grincheux