Clarification: in any application there are all sorts of menus, toolbars, etc. how it is possible to receive the list of these objects through win32api? the next step is to select one of the objects and get its coordinates.

Do I understand correctly that in addition to hwnd there is cwnd, and you need to dig in this direction? What if the application is not written in C++?

Can I access the coordinates of these objects?

GetWindow EnumWindows docs.microsoft.com/en-us/windows/win32/api/winuser/… There's a hierarchical structure. Objects can be nested in the window, and more and more objects can be nested in objects.

nick_n_a2022-01-14 08:06:22

cwnd is a wrapper class. Window type objects are built according to the hwnd descriptor, the presence of the descriptor does not mean the presence of cwnd.

nick_n_a2022-01-14 08:08:06

@nick_n_a, I'm trying to implement in python a binding to the current active application window, but it has a menu (edit file, etc.), below the toolbar, below which you need to bind.

biomotor2022-01-14 08:15:02

EnumWindows displays only the name of the application, you can create several documents in it, but they are not displayed in the EnumWindows list, and there are no windows as such. I'm interested in how to display a list of all the elements that make up the application? those. if the application consists of several buttons, then I need to get the buttons, if the panel with buttons, then the panel, etc...

biomotor2022-01-14 08:42:29