HWND WindowFromPoint(
POINT Point // structure with point
);
函数功能:该函数获得包含指定点的窗口的句柄。
BOOL GetCursorPos(
LPPOINT lpPoint // address of structure for cursor position
);
POINT MousePoint;
GetCursorPos(&MousePoint);
HANDLE hWindow = WindowFromPoint(MousePoint);