分享
 
 
 

SetWindowRgn

王朝百科·作者佚名  2010-04-05
窄屏简体版  字體: |||超大  

SetWindowRgn 函数

The SetWindowRgn function sets the window region of a window. The window region determines the area within the window where the system permits drawing. The system does not display any portion of a window that lies outside of the window region

定义

int SetWindowRgn(HWND hWnd, HRGN hRgn, BOOL bRedraw);

int SetWindowRgn(HRGN hRgn,BOOL bRedraw);//在VC6.0基于对话框时候,该函数是这样的,有两个参数

参数

hWnd

[in] Handle to the window whose window region is to be set.

hRgn

[in] Handle to a region. The function sets the window region of the window to this region.

If hRgn is NULL, the function sets the window region to NULL.

bRedraw

[in] Specifies whether the system redraws the window after setting the window region. If bRedraw is TRUE, the system does so; otherwise, it does not.

Typically, you set bRedraw to TRUE if the window is visible.

返回值

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero.

Windows NT/2000/XP: To get extended error information, call GetLastError.

说明

When this function is called, the system sends the WM_WINDOWPOSCHANGING and WM_WINDOWPOSCHANGED messages to the window.

The coordinates of a window's window region are relative to the upper-left corner of the window, not the client area of the window.

After a successful call to SetWindowRgn, the system owns the region specified by the region handle hRgn. The system does not make a copy of the region. Thus, you should not make any further function calls with this region handle. In particular, do not delete this region handle. The system deletes the region handle when it no longer needed.

To obtain the window region of a window, call the GetWindowRgn function.

系统要求

Windows NT/2000/XP: Included in Windows NT 3.51 and later.

Windows 95/98/Me: Included in Windows 95 and later.

Header: Declared in Winuser.h; include Windows.h.

Library: Use User32.lib.

SetWindowRgn

SetWindowRgn 函数

SetWindowRgn 功能设定窗户的窗户区域。 窗户区域决定系统允许图画的窗户里面的区域。 系统不显示在窗户区域的外面躺卧的窗户的任何部分

定义

int SetWindowRgn;(HWND hWnd, HRGN hRgn, BOOL bRedraw)

参数

hWnd

[在] 对窗户区域将被设定的窗户的柄。

hRgn

[在] 对一个区域的柄。 功能将窗户的窗户区域设定为这一个区域。

如果 hRgn 是无效力的,功能将窗户区域设定为零。

bRedraw

[在] 叙述系统是否在设定窗户区域之后重划窗户。 如果 bRedraw 是真实的,系统这么做; 另外,它不。

典型地, 你设定 bRedraw 到真实的如果窗户是看得见的。

返回值

如果功能成功,回返价值是非零。

如果功能失败,回返价值是零。

windows NT/2000/XP: 得到广大的错误数据,呼叫 GetLastError 。

说明

当这功能被呼叫的时候,系统把给窗户的讯息送给 WM_WINDOWPOSCHANGING 和 WM_WINDOWPOSCHANGED 。

一个窗户的窗户区域的坐标相对于窗户的上面-左边角落而不是窗户的客户区域。

在一个成功的呼叫之后,对 SetWindowRgn ,系统拥有被区域柄 hRgn 指定的区域。 系统不作区域的副本。 因此,你不应该用这一个区域柄来制造任何的较进一步的功能呼叫。 尤其,不划除这一个区域柄。 当它不再需要的时候,系统划除区域柄。

为了要获得窗户的窗户区域, GetWindowRgn 功能呼叫。

系统要求

windows NT/2000/XP: 在windows NT 3.51 和稍后包含了。

windows 95/98/me: 在windows 95 和稍后包含了。

头文件: 在 Winuser.h 声明; 包括 Windows.h 。

Library: 使用 User32. lib。

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有