The good code is :

Code:
SetCursorPos((long)VG_souris_posX,(long)VG_souris_posY);



In window mode SetCursorPos put the mouse to the coordinates of desktop window but not the coordinates of the window of the game. I do not know how to calculate the difference.

Please help me.