1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
#include<bits/stdc++.h> #include<windows.h> using namespace std;
void TopWindow(HWND &hWnd) { SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); }
int main(){ HWND hWnd = GetForegroundWindow(); int n; GetCursorPos(&c); while(1 == 1){ TopWindow(hWnd); mouse_event(MOUSEEVENTF_RIGHTDOWN,c.x,c.y,0,0); mouse_event(MOUSEEVENTF_RIGHTUP,c.x,c.y,0,0); Sleep(n); } return 0; }
CPP
|