网站首页  词典首页

请输入您要查询的函数:

 

术语 getwindowdc
释义 GetWindowDC
语法:
HDC GetWindowDC(
__in HWND hWnd
);
GetWindowDC函数
该GetWindowDC函数检索整个窗口的设备上下文(DC),包括标题栏,菜单,滚动条。一个窗口设备上下文允许任何地方画一个窗口,因为该设备上下文的原点是左上角,而不是客户区的窗口角落。
GetWindowDC分配默认的属性窗口的设备上下文每次检索的设备上下文。上一个属性都将丢失。
参数
hWnd [in]
一个句柄,的设备上下文是要检索窗口。如果此值为NULL,GetWindowDC检索整个屏幕的设备上下文。
如果该参数为NULL,GetWindowDC检索用于主显示屏的设备上下文。要获得其他显示器设备上下文,使用EnumDisplayMonitors和CreateDC功能。
返回值
如果函数成功,返回值是一个句柄指定的窗口设备上下文。
如果函数失败,返回值为NULL,显示错误或无效的hWnd参数。
备注
GetWindowDC是用于在一个窗口的非工作区的特殊涂装效果。在非工作区的任何窗口地区绘画不建议。
GetSystemMetrics函数可用于检索各地的非工作区,如标题栏,菜单,尺寸,和滚动条。
GetDC函数可用于检索整个屏幕的设备上下文。
画完成后,该ReleaseDC函数必须调用释放设备上下文。没有释放的窗口设备上下文已被应用程序所要求的绘画产生严重影响。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinuser.h(头文件:winuser.h)
LibraryUser32.lib
DLLUser32.dll
参见
绘画和绘图概述
绘画和绘图功能
调用BeginPaint
GetDC
GetSystemMetrics
ReleaseDC
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==GetWindowDC Function
The GetWindowDC function retrieves the device context (DC) for the entire window, including title bar, menus, and scroll bars. A window device context permits painting anywhere in a window, because the origin of the device context is the upper-left corner of the window instead of the client area.
GetWindowDC assigns default attributes to the window device context each time it retrieves the device context. Previous attributes are lost.
Syntax
HDC GetWindowDC(
__in HWND hWnd
);
Parameters
hWnd [in]
A handle to the window with a device context that is to be retrieved. If this value is NULL, GetWindowDC retrieves the device context for the entire screen.
If this parameter is NULL, GetWindowDC retrieves the device context for the primary display monitor. To get the device context for other display monitors, use the EnumDisplayMonitors and CreateDC functions.
Return Value
If the function succeeds, the return value is a handle to a device context for the specified window.
If the function fails, the return value is NULL, indicating an error or an invalid hWnd parameter.
Remarks
GetWindowDC is intended for special painting effects within a window's nonclient area. Painting in nonclient areas of any window is not recommended.
The GetSystemMetrics function can be used to retrieve the dimensions of various parts of the nonclient area, such as the title bar, menu, and scroll bars.
The GetDC function can be used to retrieve a device context for the entire screen.
After painting is complete, the ReleaseDC function must be called to release the device context. Not releasing the window device context has serious effects on painting requested by applications.
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
BeginPaint
GetDC
GetSystemMetrics
ReleaseDC
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd144947(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 13:23:07