Share via


CRgn::SetRectRgn

voidSetRectRgn(intx1**,inty1,intx2,inty2);**

voidSetRectRgn(LPCRECTlpRect**);**

Parameters

x1

Specifies the x-coordinate of the upper-left corner of the rectangular region.

y1

Specifies the y-coordinate of the upper-left corner of the rectangular region.

x2

Specifies the x-coordinate of the lower-right corner of the rectangular region.

y2

Specifies the y-coordinate of the lower-right corner of the rectangular region.

lpRect

Specifies the rectangular region. Can be either a pointer to a RECT structure or a CRect object.

Remarks

Creates a rectangular region. Unlike CreateRectRgn, however, it does not allocate any additional memory from the local Windows application heap. Instead, it uses the space allocated for the region stored in the CRgn object. This means that the CRgn object must already have been initialized with a valid Windows region before calling SetRectRgn. The points given by x1, y1, x2, and y2 specify the minimum size of the allocated space.

Use this function instead of the CreateRectRgn member function to avoid calls to the local memory manager.

CRgn OverviewClass MembersHierarchy Chart

See Also   CRgn::CreateRectRgn,