tags:

views:

63

answers:

2

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

+2  A: 

You can use GetWindowFromPoint. It will return the window handle so you can than use GetClassName function to see which control it is.

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

Ruben Trancoso
Amazing. I've been beating my head against the wall for a while trying to find this. Thanks! :D
Barry Burns
A: 

Use the WindowFromPoint, ChildWindowFromPoint or ChildWindowFromPointEx Win32 functions.

jussij