Windows Dev Center

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SetRectRgn function

The SetRectRgn function converts a region into a rectangular region with the specified coordinates.

Syntax


BOOL SetRectRgn(
  _In_  HRGN hrgn,
  _In_  int  nLeftRect,
  _In_  int  nTopRect,
  _In_  int  nRightRect,
  _In_  int  nBottomRect
);

Parameters

hrgn [in]

Handle to the region.

nLeftRect [in]

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

nTopRect [in]

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

nRightRect [in]

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

nBottomRect [in]

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

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero.

Remarks

The region does not include the lower and right boundaries of the rectangle.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wingdi.h (include Windows.h)

Library

Gdi32.lib

DLL

Gdi32.dll

See also

Regions Overview
Region Functions
CreateRectRgn

 

 

Community Additions

Show:
© 2015 Microsoft