Sign in Join
FPDoc Onlineexperiment

GetCompositorExtendedBorder function

In unit LCLIntf

Gets extended border information added by the compositor for the Desktop Window Manager.

Declaration

pascal
function GetCompositorExtendedBorder(handle: HWND; var Borders: TRect)
: Boolean

Arguments

handle

A handle to a window.

Borders

TRect instance with the extended border for the control in handle. Relevant when the return value is True.

Function result

Returns True if the function succeeds. A TRect instance with the borders added by the compositor for the Desktop Window Manager is returned in the Borders argument. Positive values indicate that the window rectangle is smaller than the reported values. If the function fails, the values in Borders are updated and are not significant.

Description

Applies to Windows version which support the Desktop Window Manager API. dwmapi was introduced in Windows Vista, and is available on subsequent Windows versions.

For example:

If GetWindowRect returns Rect(0, 0, 1280, 1024) on Windows 10, the visible bounds rect is much smaller, with the difference appearing as if it is not part of the window (the transparent shadow). The "actual" frame is drawn at Rect(7, 0, 1273, 1017). In this case, this function returns Rect(7, 0, 7, 7).

Added in LCL version 3.0.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.