int x = GetSystemMetrics(SM_CXFULLSCREEN); int y = GetSystemMetrics(SM_CYFULLSCREEN); SetCursorPos(x / 2, y / 2); // 移动鼠标到屏幕中央