VC 获取鼠标下面的窗口

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

转载于:https://www.cnblogs.com/rogee/archive/2011/02/15/1954969.html

猜你喜欢

转载自blog.csdn.net/weixin_34252090/article/details/94681165
vc