Thema: Delphi Mouse Extern steuern

Einzelnen Beitrag anzeigen

Benutzerbild von Khabarakh
Khabarakh

Registriert seit: 18. Aug 2004
Ort: Brackenheim VS08 Pro
2.876 Beiträge
 
#8

Re: Mouse Extern steuern

  Alt 3. Aug 2005, 12:26
Zitat von ichbins:
und was ich auch noch wissen wollte: wie krieg ich raus ob die Maus gedrückt ist?
Versuch es mal mit
GetAsyncKeyState(VK_LBUTTON); // Für die linke Maustaste Das bezieht sich aber immer auf die realen Maustasten, wenn du sie vertauscht hast, wird das nicht beachtet.
MSDN
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.
Sebastian
Moderator in der EE
  Mit Zitat antworten Zitat