能力值:
( LV2,RANK:10 )
|
-
-
2 楼
可能在下表达不清楚:
LONG Left = Rect.left+((Rect.right - Rect.left) *0.84);
LONG Top = Rect.top+((Rect.bottom - Rect.top) *0.06);
::SetCursorPos(Left,Top);
移动光标到指定位置是我预想的一样
但是::PostMessage点击的位置就不对了 这是为什么呢
|
能力值:
( LV2,RANK:10 )
|
-
-
3 楼
搞不懂你要干什么,下次写标题把问题描述清楚点儿吧。
点击某个位置用SendMessage
void mouseClick(HWND hwnd, unsigned long x, unsigned long y)
{
SendMessage(hwnd, WM_LBUTTONDOWN, MK_LBUTTON, MAKELPARAM(x, y));
SendMessage(hwnd, WM_LBUTTONUP, NULL, MAKELPARAM(x, y));
}
void keyPress(HWND hwnd, int key)
{
BYTE scancode = MapVirtualKey(key,MAPVK_VK_TO_VSC);
SendMessage(hwnd, WM_KEYDOWN, key, MAKELPARAM(0, scancode));
SendMessage(hwnd, WM_KEYUP, key, MAKELPARAM(0, scancode));
}
|
|
|