GetRgnBox

  int GetRgnBox(hrgn, lprc)    
  HRGN hrgn; /* handle of a region */
  LPRECT lprc; /* address of structure that receives the bounding rect */

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

Parameters

hrgn

Identifies the region.

lprc

Points to a RECT structure that receives the bounding rectangle.

Return Value

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

Value Meaning

NULLREGION New region is empty.
SIMPLEREGION New region is a single rectangle.
COMPLEXREGION New region is more than a single rectangle.

The return value is 0 if the hrgn parameter does not specify a valid region.