1
2void GameStart()
3{
4 HWND hGame= ::FindWindow(NULL,_T("超级玛丽专用辅助"));
5 CRect rect;
6 GetWindowRect(hGame,&rect);
7
8 POINT ptNow//模拟之前鼠标的位置
9 ,pt;//要模拟的位置
10
11 GetCursorPos(&ptNow);//保存模拟之前的鼠标位置
12 pt.x = rect.left + 213;
13 pt.y = rect.top + 370;
14 SetCursorPos(pt.x,pt.y);//新的位置
15 mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
16 mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
17 SetCursorPos(ptNow.x,ptNow.y);//恢复模拟之前的鼠标位置
18}
19
posted on 2012-12-07 09:58
寻步 阅读(294)
评论(0) 编辑 收藏 引用 所属分类:
Hack