GetRgnBox function (wingdi.h)

The GetRgnBox function retrieves the bounding rectangle of the specified region.

Syntax

int GetRgnBox(
  [in]  HRGN   hrgn,
  [out] LPRECT lprc
);

Parameters

[in] hrgn

A handle to the region.

[out] lprc

A pointer to a RECT structure that receives the bounding rectangle in logical units.

Return value

The return value specifies the region's complexity. It can be one of the following values:

Value Meaning
NULLREGION Region is empty.
SIMPLEREGION Region is a single rectangle.
COMPLEXREGION Region is more than a single rectangle.
 

If the hrgn parameter does not identify a valid region, the return value is zero.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header wingdi.h (include Windows.h)
Library Gdi32.lib
DLL Gdi32.dll

See also

RECT

Region Functions

Regions Overview