网站首页  计算机词典

请输入您要查询的字词:

 

字词 getwindowrgn
释义 GetWindowRgn
语法:
int GetWindowRgn(
__in HWND hWnd,
__in HRGN hRgn
);
GetWindowRgn功能
该GetWindowRgn函数获得一个窗口的窗口区域的副本。窗口的窗口区域是通过调用SetWindowRgn函数。窗口内的区域确定在制度允许的范围绘图窗口。该系统不显示任何一个窗口,是外界的窗口地区的部分
参数
hWnd [in]
句柄窗口的窗口区域是获得。
hRgn [in]
句柄将被修改,以窗口地区的代表地区。
返回值
返回值指定区域类型的功能获得。它可以是下列值之一。
ValueMeaning
NULLREGIONThe区域是空的。
SIMPLEREGIONThe地区是一个矩形。
COMPLEXREGIONThe地区不止一个矩形。
ERRORThe指定的窗口没有一个地区,或发生错误在试图返回该地区。
备注
在一个窗口的窗口地区的坐标是相对于左上角的窗口,而不是窗口的客户区。
要设置一个窗口的窗口地区,调用SetWindowRgn函数。
下面的代码演示如何在处理现有地区传递。

HRGN hrgn = CreateRectRgn(0,0,0,0);
int regionType = GetWindowRgn(hwnd, hrgn);
if (regionType != ERROR)
{
/* hrgn contains window region */
}
DeleteObject(hrgn); /* finished with region */

要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinuser.h(头文件:winuser.h)
LibraryUser32.lib
DLLUser32.dll
参见
绘画和绘图概述
绘画和绘图功能
SetWindowRgn
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==GetWindowRgn Function
The GetWindowRgn function obtains a copy of the window region of a window. The window region of a window is set by calling the SetWindowRgn function. 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
Syntax
int GetWindowRgn(
__in HWND hWnd,
__in HRGN hRgn
);
Parameters
hWnd [in]
Handle to the window whose window region is to be obtained.
hRgn [in]
Handle to the region which will be modified to represent the window region.
Return Value
The return value specifies the type of the region that the function obtains. It can be one of the following values.
ValueMeaning
NULLREGIONThe region is empty.
SIMPLEREGIONThe region is a single rectangle.
COMPLEXREGIONThe region is more than one rectangle.
ERRORThe specified window does not have a region, or an error occurred while attempting to return the region.

Remarks
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.
To set the window region of a window, call the SetWindowRgn function.
The following code shows how you pass in the handle of an existing region.

HRGN hrgn = CreateRectRgn(0,0,0,0);
int regionType = GetWindowRgn(hwnd, hrgn);
if (regionType != ERROR)
{
/* hrgn contains window region */
}
DeleteObject(hrgn); /* finished with region */
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinuser.h (include Windows.h)
LibraryUser32.lib
DLLUser32.dll
See Also
Painting and Drawing Overview
Painting and Drawing Functions
SetWindowRgn
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd144950(VS.85).aspx\n
随便看

 

计算机英汉双解词典包含34412条计算机术语英汉翻译词条,基本涵盖了全部常用计算机术语的翻译及用法,是计算机学习及翻译工作的有利工具。

 

Copyright © 2021-2025 foosec.com All Rights Reserved
更新时间:2026/10/24 0:46:41