WM_MOUSEMOVE, WM_LBUTTONDOWN und WM_LBUTTONUP sind laut Dokumentation Nachrichten die
per PostMessage versand werden:
Delphi-Quellcode:
const
x = 10;
y = 10;
xy = x or y shl 16;
var
Wnd: HWND;
begin
Wnd := FindWindow('TForm1', 'Form1');
if Wnd = HWND(nil) then
begin
ShowMessage('Fenster nicht gefunden');
Exit;
end;
PostMessage(Wnd, WM_MOUSEMOVE , 0 , xy);
PostMessage(Wnd, WM_LBUTTONDOWN, MK_LBUTTON, xy);
PostMessage(Wnd, WM_LBUTTONUP , 0 , xy);
end;