I want to move my mouse on my screen, I use this code :
#include <windows.h>
int main(int argc, int *argv[]){
POINT pt;
GetCursorPos(&pt);
printf("Current cursor position (%d, %d)\n", pt.x, pt.y);
pt.x = 100;
pt.y = 100;
SetCursorPos(pt.x, pt.y);
GetCursorPos(&pt);
printf("Current cursor position (%d, %d)\n", pt.x, pt.y);
system("pause");
}
This script works I see that the position changes, but the mouse does not move on the screen. Should I use another function to move cursor ?