术语 | getrandomrgn |
释义 | GetRandomRgn 语法: int GetRandomRgn( __in HDC hdc, __in HRGN hrgn, __in INT iNum ); GetRandomRgn功能 函数的GetRandomRgn剪辑复制系统的指定设备上下文地区的特定区域。 参数 hdc [in] 一个句柄,设备上下文。 hrgn [in] 一个句柄,地区。前函数被调用,这确定了现有的区域。函数返回后,这确定了现行制度的区域的副本。旧区域的hrgn确定被覆盖。 iNum [in] 此参数必须SYSRGN。 返回值 如果函数成功,返回值为1。如果函数失败,返回值为-1。如果该区域要检索为NULL,则返回值为0。如果函数失败或将要检索的地区是NULL,hrgn未初始化。 备注 当使用SYSRGN标志,请注意系统剪辑区域可能不运动,因为当前的窗口。但是,它是安全的检索和使用该系统裁剪区域内调用BeginPaint - EndPaint在WM_PAINT消息处理模块。在这种情况下,系统区域是更新的区域的交汇点,当前窗口的可见区域。任何窗口运动后GetRandomRgn返回前EndPaint将导致新的WM_PAINT消息。任何SYSRGN旗其他用途可能会导致应用程序中的绘画错误。 该地区返回屏幕坐标。 要求: 最低支持:client-Windows 2000专业版 最低支持server-Windows 2000服务器 HeaderWingdi.h(头文件:winuser.h) LibraryGdi32.lib DLLGdi32.dll 参见 裁剪概述 裁剪功能 调用BeginPaint EndPaint ExtSelectClipRgn GetClipRgn GetClipBox GetRegionData OffsetRgn 如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com) 生成日期:2009年7月11日 ==英文原文==GetRandomRgn Function The GetRandomRgn function copies the system clipping region of a specified device context to a specific region. Syntax int GetRandomRgn( __in HDC hdc, __in HRGN hrgn, __in INT iNum ); Parameters hdc [in] A handle to the device context. hrgn [in] A handle to a region. Before the function is called, this identifies an existing region. After the function returns, this identifies a copy of the current system region. The old region identified by hrgn is overwritten. iNum [in] This parameter must be SYSRGN. Return Value If the function succeeds, the return value is 1. If the function fails, the return value is -1. If the region to be retrieved is NULL, the return value is 0. If the function fails or the region to be retrieved is NULL, hrgn is not initialized. Remarks When using the SYSRGN flag, note that the system clipping region might not be current because of window movements. Nonetheless, it is safe to retrieve and use the system clipping region within the BeginPaint - EndPaint block during WM_PAINT processing. In this case, the system region is the intersection of the update region and the current visible area of the window. Any window movement following the return of GetRandomRgn and before EndPaint will result in a new WM_PAINT message. Any other use of the SYSRGN flag may result in painting errors in your application. The region returned is in screen coordinates. Requirements Minimum supported clientWindows 2000 Professional Minimum supported serverWindows 2000 Server HeaderWingdi.h (include Windows.h) LibraryGdi32.lib DLLGdi32.dll See Also Clipping Overview Clipping Functions BeginPaint EndPaint ExtSelectClipRgn GetClipRgn GetClipBox GetRegionData OffsetRgn Send comments about this topic to Microsoft Build date: 7/11/2009 ==原始网址==http://msdn.microsoft.com/en-us/library/dd144918(VS.85).aspx\n |
随便看 |
|
windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。