NO

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

Offline Grincheux

  • Member
  • *
  • Posts: 210
  • Never be pleased, always improve
    • Arachne
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.
-------------------------
Kenavo / Bye

Offline John Z

  • Member
  • *
  • Posts: 222
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


Offline Grincheux

  • Member
  • *
  • Posts: 210
  • Never be pleased, always improve
    • Arachne
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.
-------------------------
Kenavo / Bye

Offline John Z

  • Member
  • *
  • Posts: 222
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

Offline Grincheux

  • Member
  • *
  • Posts: 210
  • Never be pleased, always improve
    • Arachne
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.
-------------------------
Kenavo / Bye

Offline John Z

  • Member
  • *
  • Posts: 222
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 »

Offline Grincheux

  • Member
  • *
  • Posts: 210
  • Never be pleased, always improve
    • Arachne
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...
-------------------------
Kenavo / Bye

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 1814
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.

Offline Grincheux

  • Member
  • *
  • Posts: 210
  • Never be pleased, always improve
    • Arachne
Re: Is the window Subclassed
« Reply #8 on: April 30, 2021, 12:58:22 pm »
I have made this too
-------------------------
Kenavo / Bye