Get ClassNN from a window handle?

Windows specific forum
highend
Enthusiast
Enthusiast
Posts: 169
Joined: Tue Jun 17, 2014 4:49 pm

Get ClassNN from a window handle?

Post by highend »

Hi,

Via Windows Api I can only get the class for an element (e.g. a button) from a window handle of that element

Code: Select all

    class  = Space(#MAX_PATH)
    GetClassName_(hWnd, @class, #MAX_PATH - 1)
So if such an external window has two buttons this would only show "Button" (the normal class) for both of them.

Is there an easy way to get the ClassNN (class + sequence number) instead (for this example it would be "Button1" & "Button2")?
AZJIO
Addict
Addict
Posts: 2183
Joined: Sun May 14, 2017 1:48 am

Re: Get ClassNN from a window handle?

Post by AZJIO »

List buttons in a loop and add a number.
viewtopic.php?t=80897
highend
Enthusiast
Enthusiast
Posts: 169
Joined: Tue Jun 17, 2014 4:49 pm

Re: Get ClassNN from a window handle?

Post by highend »

Thanks!
Post Reply