Einzelnen Beitrag anzeigen

Benutzerbild von SirThornberry
SirThornberry
(Moderator)

Registriert seit: 23. Sep 2003
Ort: Bockwen
12.235 Beiträge
 
Delphi 2006 Professional
 
#7

Re: abfragen ob mouse button down / EGAL wo die maus gerade

  Alt 14. Feb 2008, 14:46
warum eigentlich GetAsyncKeyState und nicht GetKeyState? Ich dachte so ein Verhalten wie bei AsyncKeyState ist genau das was du nicht willst.
Anstelle der 1 wäre es auch besser du verwendest die entsprechenden Konstanten (VK_LBUTTON,...) und vor allem diesen Absatz aus der Hilfe beachten!

Zitat:
The GetAsyncKeyState function works with mouse buttons. However, it checks on the state of the physical mouse buttons, not on the logical mouse buttons that the physical buttons are mapped to. For example, the call GetAsyncKeyState(VK_LBUTTON) always returns the state of the left physical mouse button, regardless of whether it is mapped to the left or right logical mouse button. You can determine the system's current mapping of physical mouse buttons to logical mouse buttons by calling
GetSystemMetrics(SM_SWAPBUTTON)

which returns TRUE if the mouse buttons have been swapped.
Jens
Mit Source ist es wie mit Kunst - Hauptsache der Künstler versteht's
  Mit Zitat antworten Zitat