c+ 隐藏黑白框
#pragma comment(linker,"/subsystem:"windows" /entry:"mainCRTStartup"" )
设置鼠标位置。鼠标指针在屏幕像素坐标系统中的X,Y位置
这个函数是用来设置Mouse位置的。可以用这个函数来移动mouse在屏幕上的移动。
GetCursorPos();//获取鼠标在屏幕的当前位置
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);//点下左键
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);//松开左键
BOOL SetCursorPos(
int X, // horizontal position
int Y // vertical position
);
GetAsyncKeyState 获取全局键盘事件
if(GetAsyncKeyState(VK_LSHIFT)) {
MessageBox(NULL,TEXT("您选择了YES"),TEXT("YES"),MB_OK);
}