X
xiaodolphin
Unregistered / Unconfirmed
GUEST, unregistred user!
我想让我的鼠标在鼠标所在窗口而且所在位置实现单击左键!(或者在某个特定窗口)
我写过这样,但是好像不行!
GetCursorPos(&MousePoint);// 获取鼠标位置
SetCursorPos(MousePoint.x,MousePoint.y);
LPARAM lParam = MAKELPARAM(MousePoint.x,MousePoint.y);
HWND hwnd=::WindowFromPoint(MousePoint);
:: SendMessage(hwnd,WM_RBUTTONDOWN,0,lParam);
:: SendMessage(hwnd,WM_RBUTTONUP,0,lParam );
请大家帮个忙啊,谢谢了!
我写过这样,但是好像不行!
GetCursorPos(&MousePoint);// 获取鼠标位置
SetCursorPos(MousePoint.x,MousePoint.y);
LPARAM lParam = MAKELPARAM(MousePoint.x,MousePoint.y);
HWND hwnd=::WindowFromPoint(MousePoint);
:: SendMessage(hwnd,WM_RBUTTONDOWN,0,lParam);
:: SendMessage(hwnd,WM_RBUTTONUP,0,lParam );
请大家帮个忙啊,谢谢了!