Sign in Join
FPDoc Onlineexperiment

GetWindowRect function

In unit LCLIntf

Retrieves the bounding rectangle for a window, including the window decoration in screen coordinates.

Declaration

pascal
function GetWindowRect(Handle: hwnd; var Rect: TRect): Integer

Description

Retrieves the bounding rectangle of a window, including the window decoration. The coordinates are given relative to the upper-left corner of the screen in screen.

After the call, Rect will be the control area in screen coordinates. That means, Left and Top will be the screen coordinate of the TopLeft pixel of the Handle object and Right and Bottom will be the screen coordinate of the BottomRight pixel.

See also

An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.