Accueil > Forum > > > > la souris
la souris
mardi 15 janvier 2008 à 23:21:59 |
la souris

xbabilone
|
Bonne année a tous . Ma question est simple . On peut recuperer la position de la souris avec la fonction GetCursorPos() de façon simple. Peut on recuperer le fait qu'un bouton de la souris soit appuyé sans passer par les messages windows du type WM_LBUTTONDOWN ? Mais par une fonction de type : bool GetLButtonDown(). Si cette fonction existe, c'est qu'il faut croire au pere noel. merci    
|
|
mercredi 16 janvier 2008 à 18:01:24 |
Re : la souris

SnOOpss
|
Ca marche aussi avec
SHORT GetAsyncKeyState( int vKey );
Soit pour toi GetAsyncKeyState( VK_LBUTTON ) pour le boutton gauche ou GetAsyncKeyState( VR_LBUTTON )
Mais cette fonction detecte le clik physique et non le clik logique comme WM_LBUTTONDOWN
|
|
mercredi 16 janvier 2008 à 18:55:59 |
Re : la souris

xbabilone
|
sur un newsgroup j'ai trouvé : Pour intercepter les evenement souris ,il faut créer un hook local pour intercepter les messages a l'interieur d'une application. Ou un hook systeme pour intercepter tous les messages pour toutes les applications. La fonction est HHOOK SetWindowsHookEx( int idHook, HOOKPROC lpfn, HINSTANCE hMod, DWORD dwThreadId );
The SetWindowsHookEx function installs an application-defined
hook procedure into a hook chain. You would install a hook procedure to
monitor the system for certain types of events. These events are
associated either with a specific thread or with all threads in the
same desktop as the calling thread. Parameters - idHook
-
[in] Specifies the type of hook procedure to be installed. This parameter can be one of the following values.
WH_CALLWNDPROC- Installs
a hook procedure that monitors messages before the system sends them to
the destination window procedure. For more information, see the CallWndProc hook procedure.
WH_CALLWNDPROCRET- Installs
a hook procedure that monitors messages after they have been processed
by the destination window procedure. For more information, see the CallWndRetProc hook procedure.
WH_CBT- Installs
a hook procedure that receives notifications useful to a computer-based
training (CBT) application. For more information, see the CBTProc hook procedure.
WH_DEBUG- Installs a hook procedure useful for debugging other hook procedures. For more information, see the DebugProc hook procedure.
WH_FOREGROUNDIDLE- Installs
a hook procedure that will be called when the application's foreground
thread is about to become idle. This hook is useful for performing low
priority tasks during idle time. For more information, see the ForegroundIdleProc hook procedure.
WH_GETMESSAGE- Installs a hook procedure that monitors messages posted to a message queue. For more information, see the GetMsgProc hook procedure.
WH_JOURNALPLAYBACK- Installs a hook procedure that posts messages previously recorded by a WH_JOURNALRECORD hook procedure. For more information, see the JournalPlaybackProc hook procedure.
WH_JOURNALRECORD- Installs
a hook procedure that records input messages posted to the system
message queue. This hook is useful for recording macros. For more
information, see the JournalRecordProc hook procedure.
WH_KEYBOARD- Installs a hook procedure that monitors keystroke messages. For more information, see the KeyboardProc hook procedure.
WH_KEYBOARD_LL- Windows NT/2000/XP: Installs a hook procedure that monitors low-level keyboard input events. For more information, see the LowLevelKeyboardProc hook procedure.
WH_MOUSE- Installs a hook procedure that monitors mouse messages. For more information, see the MouseProc hook procedure.
WH_MOUSE_LL- Windows NT/2000/XP: Installs a hook procedure that monitors low-level mouse input events. For more information, see the LowLevelMouseProc hook procedure.
WH_MSGFILTER- Installs
a hook procedure that monitors messages generated as a result of an
input event in a dialog box, message box, menu, or scroll bar. For more
information, see the MessageProc hook procedure.
WH_SHELL- Installs a hook procedure that receives notifications useful to shell applications. For more information, see the ShellProc hook procedure.
WH_SYSMSGFILTER- Installs
a hook procedure that monitors messages generated as a result of an
input event in a dialog box, message box, menu, or scroll bar. The hook
procedure monitors these messages for all applications in the same
desktop as the calling thread. For more information, see the SysMsgProc hook procedure.
- lpfn
-
[in] Pointer to the hook procedure. If the dwThreadId parameter is zero or specifies the identifier of a thread created by a different process, the lpfn parameter must point to a hook procedure in a DLL. Otherwise, lpfn can point to a hook procedure in the code associated with the current process.
- hMod
-
[in] Handle to the DLL containing the hook procedure pointed to by the lpfn parameter. The hMod parameter must be set to NULL if the dwThreadId
parameter specifies a thread created by the current process and if the
hook procedure is within the code associated with the current process.
- dwThreadId
-
[in] Specifies the identifier of the thread with which the hook
procedure is to be associated. If this parameter is zero, the hook
procedure is associated with all existing threads running in the same
desktop as the calling thread.
Return Value If the function succeeds, the return value is the handle to the hook procedure. If the function fails, the return value is NULL. To get extended error information, call
   
|
|
Cette discussion est classée dans : fonction, recuperer, type, simple, souris
Répondre à ce message
Sujets en rapport avec ce message
type de donnée inconnu [ par jeffise57 ]
dans une fonction developper par une autre personne j'ai un type char** trucmuche, cette variable est un buffer qui doit recevoir le résultat qu'est c
DialogBox pour recuperer un fichier sur le disque... [ par coyote19 ]
J'ai besoin de recuperer un path d'un fichier. J'ai reussi grace a la fonction SH_BrowseForFolder et les objets BROWSEINFO, mais a present je ne voudr
Au secours...en C, C++, existe-t-il une fonction qui retourne le type d'une variable saisie au clavier..?? [ par kro42power ]
Je crois que tout y est...
Une fonction multi-type ? [ par TeLeTUbIz ]
Ouah !!!J'ai cherché, scruté dans tout les coins, soulevé les montagnes,... mais je ne trouve pas solution à mon problème.En fait, je voudrais faire u
suivi de souris/fonction gluUnProject [ par LudoBoOz ]
Salut @ tous!!Je rencontre des difficultes a faire suivre un quadrillage au mouvement de la souris. Le quadrillage est centre sur le pointeur de la so
Recuperer l'icon associer a un type de fichier [ par PinkRabbit84 ]
Comment fait-on pour recuperer l'icone associer a un type de fichier pour pourvoir ensuite l'afficher dans un TREEVIEW ou un LISTVIEW.Merci d'avancePi
Traitement d'images et corrélation [ par perigv ]
Bonjour à tous,J'aurais bien besoin d'un coup de main.J'ai commencer à réaliser un petit programme qui me permettra de comparer deux images que je cha
fonction apply / template [ par pointejb ]
Bonjour à tous,Je cherche un moyen d'implémenter une fonction de type 'apply' qui prendrait en parametres une fonction et ses arguments et qui aurait
Variable de type char [ par wolfcyber ]
bonjour, J'aimerais savoir l'equivalent en C++ de la fonction "Mid(int nStart,int nCount)" de la classe CString, pour une variable de type char. Cet
Fonction qui renvoi un pointeur sur un type objet [ par tintin72 ]
Bonjour,j'aimerais savoir comment faire une fonction qui renvoi un pointeur sur un type objet.En fait j'aimerais pouvoir faire ça :class Cclasse{
Livres en rapport
|
Derniers Blogs
UNE JOLIE-HORLOGE ET PAS QU'UN PEU !UNE JOLIE-HORLOGE ET PAS QU'UN PEU ! par neodante
Pour les possesseurs d'iPhone, ça y est Bijin Tokei - qui se traduit littéralement en Français par " Jolie Horloge " - est arrivé et GRATUITEMENT s'il vous plaît ! Après la version Tokyo, Hokkaido, night club, racing, Gal, "pour les mademoiselles'", . voi...
Cliquez pour lire la suite de l'article par neodante TECHDAYS PARIS 2010 : CONNECTEZ VOS DONNéES à SHAREPOINT 2010 AVEC LES BUSINESS CONNECTIVITY SERVICESTECHDAYS PARIS 2010 : CONNECTEZ VOS DONNéES à SHAREPOINT 2010 AVEC LES BUSINESS CONNECTIVITY SERVICES par ROMELARD Fabrice
Animé par: Gaetan Bouveret et Julien Chomarat Business Connectivity Services (BCS) est dans SharePoint 2010 la version 2 de Business Data Catalog (BDC dans SharePoint 2007). Il s'agit de la solution permettant de visualiser des données provenan...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice [DIVERS] SUIVRE VOS SéRIES PRéFéRéS SUR LA TOILE[DIVERS] SUIVRE VOS SéRIES PRéFéRéS SUR LA TOILE par orion
Comme de nombreux geek, je suis un grand amateur de série TV et je rate régulièrement des épisodes de mes séries préférés. Une solution s'offre à vous avec ce merveilleux site : Tv Gorge - www.tvgorge.com Moteur de recherche à l'appui, vous pouvez ...
Cliquez pour lire la suite de l'article par orion TECHDAYS PARIS 2010 : LA BI DANS SHAREPOINT 2010TECHDAYS PARIS 2010 : LA BI DANS SHAREPOINT 2010 par ROMELARD Fabrice
Animé par: Vincent Bellet et Baptiste Giraudier La BI dans SharePoint 2010, Les nouveaux services d'application dans SP2010 et SQL Server Reporting services 2008 R2. La BI dans SharePoint est généralisée pour tous afin de permettre à tous les coll...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice
Forum
RE : WIN APIRE : WIN API par racpp
Cliquez pour lire la suite par racpp WIN APIWIN API par omarino_007
Cliquez pour lire la suite par omarino_007
Logiciels
DB-MAIN (9.1.0)DB-MAIN (9.1.0)DB-MAIN is a data-modeling and data-architecture tool. It is designed to help developers and anal... Cliquez pour télécharger DB-MAIN Xilisoft DPG Convertisseur (5.1.37.0120)XILISOFT DPG CONVERTISSEUR (5.1.37.0120)Xilisoft DPG Convertisseur offre aux fans de Nintendo DS une bonne solution leur permettant de dé... Cliquez pour télécharger Xilisoft DPG Convertisseur GraphicsGale (2.01.01)GRAPHICSGALE (2.01.01)GraphicsGale est un logiciel de PixelArt avec de nombreuse fonctionnalités permettant de réalisé ... Cliquez pour télécharger GraphicsGale Architecte 3D (Platinum 2010)ARCHITECTE 3D (PLATINUM 2010)Architecte 3D Platinium vous permet de concevoir facilement les plans votre future maison, de l'é... Cliquez pour télécharger Architecte 3D TeamViewer 5 (TeamViewer 5)TEAMVIEWER 5 (TEAMVIEWER 5)Dépanner un ami,expliquer une manipulation devient un jeu d'enfant.
Prise en main d'un autre ord... Cliquez pour télécharger TeamViewer 5
|