网站首页  词典首页

请输入您要查询的函数:

 

术语 getdcex
释义 GetDCEx
语法:
HDC GetDCEx(
__in HWND hWnd,
__in HRGN hrgnClip,
__in DWORD flags
);
GetDCEx功能
该GetDCEx函数检索的句柄设备上下文的指定窗口的工作区(区)或整个屏幕。您可以使用返回的GDI函数在随后的处理,引入直流。设备上下文是一个不透明的数据结构,其值由GDI内部使用。
此功能是对GetDC函数,这使得一个应用程序更好地控制如何以及是否延长剪辑在客户区发生。
参数
hWnd [in]
一个句柄,窗口的DC是要检索。如果此值为NULL,GetDCEx检索整个屏幕的DC。
hrgnClip [in]
阿剪辑区域可能与DC的可见区域相结合。如果标志值是DCX_INTERSECTRGN或DCX_EXCLUDERGN,那么操作系统承担着该地区的所有权,并会自动删除它时,它不再需要。在这种情况下,应用程序不应使用或删除该区域后,成功调用GetDCEx。
旗 [in]
指定如何创建的DC。此参数可以是一个或多个下列值。
ValueMeaning
DCX_WINDOWReturns的DC对应的窗口矩形,而不是客户端的矩形。
DCX_CACHEReturns直流从缓存,而不是OWNDC或CLASSDC窗口。基本上覆盖CS_OWNDC和CS_CLASSDC。
DCX_PARENTCLIPUses父窗口的可见区域。母公司的WS_CLIPCHILDREN和CS_PARENTDC样式位被忽略。原产地设置为左上角由hWnd确定的窗口角落。
DCX_CLIPSIBLINGSExcludes由hWnd上述确定的窗口中的所有兄弟窗口的可见区域。
DCX_CLIPCHILDRENExcludes由hWnd低于确定的窗口中的所有子窗口的可见区域。
DCX_NORESETATTRSDoes不重置本区的属性为默认属性时,这个区被释放。
DCX_LOCKWINDOWUPDATEAllows绘图即使是在效果,否则排除此窗口LockWindowUpdate呼吁。在跟踪用于绘图。
DCX_EXCLUDERGNThe裁剪区域的hrgnClip确定被排除在返回的直流可见区域。
DCX_INTERSECTRGNThe裁剪区域的确定,是相交hrgnClip与返回的直流可见区域。
DCX_INTERSECTUPDATEReserved,不要使用。
DCX_VALIDATEReserved,不要使用。
返回值
如果函数成功,返回值是处理指定窗口区。
如果函数失败,返回值为NULL。一个hWnd参数为无效值将导致函数失败。
备注
除非显示区属于窗口类的ReleaseDC函数必须调用画后发布的DC。此外,ReleaseDC必须调用的线程中调用GetDCEx。区议会的数量只受可用内存。
该函数返回的句柄的DC属于窗口的类,如果CS_CLASSDC,CS_OWNDC或CS_PARENTDC是作为WNDCLASS结构的样式类时指定的注册成立。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinuser.h(头文件:winuser.h)
LibraryUser32.lib
DLLUser32.dll
参见
设备上下文概述
设备上下文函数
调用BeginPaint
GetWindowDC
ReleaseDC
窗口类
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==GetDCEx Function
The GetDCEx function retrieves a handle to a device context (DC) for the client area of a specified window or for the entire screen. You can use the returned handle in subsequent GDI functions to draw in the DC. The device context is an opaque data structure, whose values are used internally by GDI.
This function is an extension to the GetDC function, which gives an application more control over how and whether clipping occurs in the client area.
Syntax
HDC GetDCEx(
__in HWND hWnd,
__in HRGN hrgnClip,
__in DWORD flags
);
Parameters
hWnd [in]
A handle to the window whose DC is to be retrieved. If this value is NULL, GetDCEx retrieves the DC for the entire screen.
hrgnClip [in]
A clipping region that may be combined with the visible region of the DC. If the value of flags is DCX_INTERSECTRGN or DCX_EXCLUDERGN, then the operating system assumes ownership of the region and will automatically delete it when it is no longer needed. In this case, the application should not use or delete the region after a successful call to GetDCEx.
flags [in]
Specifies how the DC is created. This parameter can be one or more of the following values.
ValueMeaning
DCX_WINDOWReturns a DC that corresponds to the window rectangle rather than the client rectangle.
DCX_CACHEReturns a DC from the cache, rather than the OWNDC or CLASSDC window. Essentially overrides CS_OWNDC and CS_CLASSDC.
DCX_PARENTCLIPUses the visible region of the parent window. The parent's WS_CLIPCHILDREN and CS_PARENTDC style bits are ignored. The origin is set to the upper-left corner of the window identified by hWnd.
DCX_CLIPSIBLINGSExcludes the visible regions of all sibling windows above the window identified by hWnd.
DCX_CLIPCHILDRENExcludes the visible regions of all child windows below the window identified by hWnd.
DCX_NORESETATTRSDoes not reset the attributes of this DC to the default attributes when this DC is released.
DCX_LOCKWINDOWUPDATEAllows drawing even if there is a LockWindowUpdate call in effect that would otherwise exclude this window. Used for drawing during tracking.
DCX_EXCLUDERGNThe clipping region identified by hrgnClip is excluded from the visible region of the returned DC.
DCX_INTERSECTRGNThe clipping region identified by hrgnClip is intersected with the visible region of the returned DC.
DCX_INTERSECTUPDATEReserved; do not use.
DCX_VALIDATEReserved; do not use.

Return Value
If the function succeeds, the return value is the handle to the DC for the specified window.
If the function fails, the return value is NULL. An invalid value for the hWnd parameter will cause the function to fail.
Remarks
Unless the display DC belongs to a window class, the ReleaseDC function must be called to release the DC after painting. Also, ReleaseDC must be called from the same thread that called GetDCEx. The number of DCs is limited only by available memory.
The function returns a handle to a DC that belongs to the window's class if CS_CLASSDC, CS_OWNDC or CS_PARENTDC was specified as a style in the WNDCLASS structure when the class was registered.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinuser.h (include Windows.h)
LibraryUser32.lib
DLLUser32.dll
See Also
Device Contexts Overview
Device Context Functions
BeginPaint
GetWindowDC
ReleaseDC
WNDCLASS
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd144873(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:24:36