NO

Author Topic: Is the window Subclassed  (Read 5623 times)

Grincheux

  • Guest
Is the window Subclassed
« on: April 29, 2021, 01:49:52 PM »
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.

Offline John Z

  • Member
  • *
  • Posts: 860
Re: Is the window Subclassed
« Reply #1 on: April 29, 2021, 03:36:39 PM »
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

  • Guest
Re: Is the window Subclassed
« Reply #2 on: April 29, 2021, 03:40:25 PM »
Yes but with the last program it shows more...
This is the reason of my question.
Have a look you will be surprised.

Offline John Z

  • Member
  • *
  • Posts: 860
Re: Is the window Subclassed
« Reply #3 on: April 29, 2021, 04:00:36 PM »
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

  • Guest
Re: Is the window Subclassed
« Reply #4 on: April 29, 2021, 04:02:54 PM »
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.

Offline John Z

  • Member
  • *
  • Posts: 860
Re: Is the window Subclassed
« Reply #5 on: April 29, 2021, 04:23:06 PM »
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.  :)
« Last Edit: April 29, 2021, 04:28:44 PM by John Z »

Grincheux

  • Guest
Re: Is the window Subclassed
« Reply #6 on: April 29, 2021, 05:14:25 PM »
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...

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: Is the window Subclassed
« Reply #7 on: April 30, 2021, 09:31:09 AM »
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

  • Guest
Re: Is the window Subclassed
« Reply #8 on: April 30, 2021, 12:58:22 PM »
I have made this too