Mausposition außerhalb eines Fensters ermitteln
-
Hallo Leute,
ich möchte die Mausposition außerhalb eines Fensters ermitteln.
Mit OnMouseMove bekomme ich die Mausposition innerhalb eines Fensters raus.Danke für eure Hilfe.
-
extern PACKAGE void __fastcall GetCursorPos(Types::TPoint &P);
Description
Call GetCursorPos to determine the current screen coordinates of the mouse cursor.
-
Hallo stemue,
könntest du mir ein Beispiel geben oder nähere Informationen?
ich komme nicht weiter. Danke!!
-
Ich habe es rausgefunden!!
POINT pos; GetCursorPos(&pos); Label1->Caption=pos.x; Label2->Caption=pos.y;das habe ich in einen Timer reingeschrieben.
-
Schreib einfach in Codezeile:
TPoint cp;
::GetCursorPos(&cp);[EDIT]Zu spät! :D[EDIT]