MFC 工程 把以下代码放到你想要响应的函数里面就行 CPoint pt; GetCursorPos(&pt);//获取鼠标在屏幕的当前位置 SetCursorPos(100,200);//移动到某点坐标mouse_event(MOUSEEVENTF_RIGHTDOWN,0,0,0,0);//点下右键mouse_event(MOUSEEVENTF_RIGHTUP,0,0,0,0);//松开右键mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);//点下左键mous