Trebaju ti sledece funkcije:
The WindowFromPoint function retrieves the handle of the window that contains the specified point.
HWND WindowFromPoint(
POINT Point // structure with point
);
The ChildWindowFromPoint function determines which, if any, of the child windows belonging to a parent window contains the specified point.
HWND ChildWindowFromPoint(
HWND hWndParent, // handle to parent window
POINT Point // structure with point coordinates
);
The GetCursorPos function retrieves the cursor's position, in screen coordinates.
BOOL GetCursorPos(
LPPOINT lpPoint // address of structure for cursor position
);
Slavisa