POINT pt; GetCursorPos(&pt); // 得到鼠标下面的窗口句柄 HWND hWnd=WindowFromPoint(pt); // 得到鼠标所在的子窗口句柄 HWND hChild=ChildWindowFromPoint(hWnd,pt);