Page 1 of 1

Get ClassNN from a window handle?

Posted: Tue May 16, 2023 7:08 am
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")?

Re: Get ClassNN from a window handle?

Posted: Tue May 16, 2023 9:17 am
by AZJIO
List buttons in a loop and add a number.
viewtopic.php?t=80897

Re: Get ClassNN from a window handle?

Posted: Fri May 19, 2023 9:27 am
by highend
Thanks!