◄CRgn► ◄Up► ◄Contents► ◄Index► ◄Back► ──Microsoft Foundation Classes────────────────────────────────────────────── void SetRectRgn( int x1, int y1, int x2, int y2 ); void SetRectRgn( LPRECT lpRect ); Parameter Description <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► function to avoid calls to the local memory manager. See Also ◄CRgn::CreateRectRgn►, ◄::SetRectRgn► -♦-