How To obtain information about the window under the cursor.
-
How can I simply get the information - handle, etc. of any window under the cursor even if it belongs to another application. Thanking you in advance. Happy programming!!
-
How can I simply get the information - handle, etc. of any window under the cursor even if it belongs to another application. Thanking you in advance. Happy programming!!
WindowFromPoint The WindowFromPoint function retrieves a handle to the window that contains the specified point. HWND WindowFromPoint( POINT Point // point ); Parameters Point [in] Specifies a POINT structure that defines the point to be checked. Return Values The return value is a handle to the window that contains the point. If no window exists at the given point, the return value is NULL. If the point is over a static text control, the return value is a handle to the window under the static text control. Remarks The WindowFromPoint function does not retrieve a handle to a hidden or disabled window, even if the point is within the window. An application should use the ChildWindowFromPoint function for a nonrestrictive search. Requirements Windows NT/2000: Requires Windows NT 3.1 or later. Windows 95/98: Requires Windows 95 or later. Header: Declared in Winuser.h; include Windows.h. Library: Use User32.lib. From MSDN ;0)