Get belonging hwnd?
Posted: Fri Feb 22, 2019 8:22 pm
Hi,
As an example: Let's say you open Windows Explorer and from within its "Folder options" window.
Two questions:
01. The folder options window contains a few tabs and subsections with elements.
How do I get the hwnd of this window when the mouse is hovering over any element in this window?
02. How do I get the hwnd of the "root" window (the hwnd of the belonging Windows Explorer window) under the same assumption that the mouse is over any element in the folder options window?
Or more generalized:
How should this be done for any application (finding the hwnd of the window that the current hovered element belongs to and finding the hwnd of the main (if the current window is a child window) window)?
Tia,
Jacky
As an example: Let's say you open Windows Explorer and from within its "Folder options" window.
Two questions:
01. The folder options window contains a few tabs and subsections with elements.
How do I get the hwnd of this window when the mouse is hovering over any element in this window?
02. How do I get the hwnd of the "root" window (the hwnd of the belonging Windows Explorer window) under the same assumption that the mouse is over any element in the folder options window?
Or more generalized:
How should this be done for any application (finding the hwnd of the window that the current hovered element belongs to and finding the hwnd of the main (if the current window is a child window) window)?
Tia,
Jacky