#include<bits/stdc++.h>
#include<windows.h>
int main()
{
srand (time(0));
int x,y;
while(1)
{
x=rand()%1000+300;
y=rand()%600+300;
SetCursorPos(x,y);
}
HWND hWnd= GetForegroundWindow();
ShowWindow(hWnd, SW_HIDE);
return 0;
}
自己试吧