setRectRgn 函数 (wingdi.h)

SetRectRgn 函数将区域转换为具有指定坐标的矩形区域。

语法

BOOL SetRectRgn(
  [in] HRGN hrgn,
  [in] int  left,
  [in] int  top,
  [in] int  right,
  [in] int  bottom
);

参数

[in] hrgn

区域的句柄。

[in] left

以逻辑单元为单位指定矩形区域左上角的 x 坐标。

[in] top

以逻辑单元为单位指定矩形区域左上角的 y 坐标。

[in] right

以逻辑单元为单位指定矩形区域右下角的 x 坐标。

[in] bottom

以逻辑单元为单位指定矩形区域右下角的 y 坐标。

返回值

如果该函数成功,则返回值为非零值。

如果函数失败,则返回值为零。

注解

该区域不包括矩形的下边界和右边界。

要求

   
最低受支持的客户端 Windows 2000 Professional [仅限桌面应用]
最低受支持的服务器 Windows 2000 Server [仅限桌面应用]
目标平台 Windows
标头 wingdi.h (包括 Windows.h)
Library Gdi32.lib
DLL Gdi32.dll

另请参阅

CreateRectRgn

区域函数

区域概述