展开全部
SetCursorPos(kx,ky);//先指定鼠标点击的坐标
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);//左键按下
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);//左键起来
mouse_event(MOUSEEVENTF_RIGHTDOWN,0,0,0,0);//右键
mouse_event(MOUSEEVENTF_RIGHTUP,0,0,0,0);
mouse_event(MOUSEEVENTF_MIDDLEDOWN,0,0,0,0);//中键
mouse_event(MOUSEEVENTF_MIDDLEUP,0,0,0,0);
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);//左键按下
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);//左键起来
mouse_event(MOUSEEVENTF_RIGHTDOWN,0,0,0,0);//右键
mouse_event(MOUSEEVENTF_RIGHTUP,0,0,0,0);
mouse_event(MOUSEEVENTF_MIDDLEDOWN,0,0,0,0);//中键
mouse_event(MOUSEEVENTF_MIDDLEUP,0,0,0,0);
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询