GetRgnBox

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

int GetRgnBox(
  HRGN hrgn,   // handle to a region
  LPRECT lprc  // pointer that receives bounding rectangle
);
 

Parameters

hrgn
Handle to the region.
lprc
Pointer to a RECT structure that receives the bounding rectangle.

Return Values

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.

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Requires version 1.0 or later.
  Header: Declared in wingdi.h.
  Import Library: Use gdi32.lib.

See Also

Regions Overview, Region Functions, RECT