Souris méchante !!!

vdox - 22 août 2001 à 11:56
jnduf Messages postés 6 Date d'inscription vendredi 17 octobre 2003 Statut Membre Dernière intervention 28 mars 2006 - 6 déc. 2005 à 14:50
Je voudrais savoir comment faire pour gérer la souris en faisant un programme simple en C .
Il me faudrais juste un petit programme que je puisse mettre dans un .h et réutiliser à l' infini .
Avec quelques fonction comme WhereSouris ou CliqueDroit (1/0)
enfin tout ce que vous pouvez trouver sur les souris quoi !

3 réponses

Tu peux utiliser l'api SetCursorPos(x, y); pour changer la position du curseur de la souris !

The SetCursorPos function moves the cursor to the specified screen coordinates. If the new coordinates are not within the screen rectangle set by the most recent ClipCursor function, Windows automatically adjusts the coordinates so that the cursor stays within the rectangle.

BOOL SetCursorPos(

int X, // horizontal position
int Y // vertical position
);


Parameters

X

Specifies the new x-coordinate, in screen coordinates, of the cursor.

Y

Specifies the new y-coordinate, in screen coordinates, of the cursor.
0
-------------------------------
Réponse au message :
-------------------------------

Tu peux utiliser l'api SetCursorPos(x, y); pour changer la position du curseur de la souris !

The SetCursorPos function moves the cursor to the specified screen coordinates. If the new coordinates are not within the screen rectangle set by the most recent ClipCursor function, Windows automatically adjusts the coordinates so that the cursor stays within the rectangle.

BOOL SetCursorPos(

int X, // horizontal position
int Y // vertical position
);


Parameters

X

Specifies the new x-coordinate, in screen coordinates, of the cursor.

Y

Specifies the new y-coordinate, in screen coordinates, of the cursor.

-------------------------------
Réponse au message :
-------------------------------

Je voudrais savoir comment faire pour gérer la souris en faisant un programme simple en C .
Il me faudrais juste un petit programme que je puisse mettre dans un .h et réutiliser à l' infini .
Avec quelques fonction comme WhereSouris ou CliqueDroit (1/0)
enfin tout ce que vous pouvez trouver sur les souris quoi !

------------------------------

AU SECOURS POUR LA SOURIS



:(
0
jnduf Messages postés 6 Date d'inscription vendredi 17 octobre 2003 Statut Membre Dernière intervention 28 mars 2006
6 déc. 2005 à 14:50
Et pour savoir si un bouton de la souris est cliqué, y-a-t-il une fonction ???



Merci
0
Rejoignez-nous