Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All


Retrieves the coordinates of the bounding rectangle of the CRgn object.

int GetRgnBox(
   LPRECT lpRect 
) const;


Points to a RECT structure or CRect object to receive the coordinates of the bounding rectangle. The RECT structure has the following form:
typedef struct tagRECT {
   int left;
   int top;
   int right;
   int bottom;

Return Value

Specifies the region's type. It can be any of the following values:

  • COMPLEXREGION    Region has overlapping borders.
  • NULLREGION   Region is empty.
  • ERROR   CRgn object does not specify a valid region.
  • SIMPLEREGION    Region has no overlapping borders.


See the example for CRgn::CreatePolygonRgn.

See Also

CRgn Overview | Class Members | Hierarchy Chart | GetRgnBox

© 2015 Microsoft