WinAPI:GetCursorPos-獲取鼠標(biāo)指針的當(dāng)前位置

字號(hào):

//聲明:
    GetCursorPos(
    var lpPoint: TPoint {POINT 結(jié)構(gòu)指針, 接收鼠標(biāo)指針的屏幕坐標(biāo)}
    ): BOOL;
    //舉例:
    var
    pt: TPoint;
    begin
    GetCursorPos(pt);
    ShowMessage(Format('ScreenX: %d; ScreenY: %d', [pt.X, pt.Y]));
    end;