Abfragen ob Maus geklickt wurde ohne WM messages?
-
Hi,
geht das? wenn ja wie?
-
Wieso ohne? Je nach dem, was du machen willst brauchst du evtl. einen Hook

-
Linke Maustaste:
if(GetAsyncKeyState(0x01)) troet();Rechte Maustaste:
if(GetAsyncKeyState(0x02)) troet();
-
Aber Achtung: Das sagt ob die Maus gedrückt WIRD, nicht ob sie gedrückt WURDE.
-
@nirsaja
Nein. Der Aufruf, so wie ich ihn geschrieben habe prüft, ob die Maustaste seit dem letzten Aufruf von GetAsyncKeystate() gedrückt wurde ODER ob sie gerade gedrückt wird. In der MSVC++ 6 Doku steht dazu folgendes:Return Values
If the function succeeds, the return value specifies whether the key was pressed since the last call to GetAsyncKeyState, and whether the key is currently up or down. If the most significant bit is set, the key is down, and if the least significant bit is set, the key was pressed after the previous call to GetAsyncKeyState. The return value is zero if a window in another thread or process currently has the keyboard focus.EDIT: Kleine Fehler...