How to determine which window / control is located at a specific point on the screen?

Is there a Win32 API call to determine which window and / or control is visible at certain coordinates and / or under the mouse?

+4
source share
2 answers

You can use GetWindowFromPoint . It will return a window handle so you can use GetClassName to find out which control it has.

here is an example: http://support.microsoft.com/kb/112649

+4
source

Use the WindowFromPoint , ChildWindowFromPoint, or ChildWindowFromPointEx Win32 functions .

+1
source

All Articles