GetDC(参数)

来源:百度知道 编辑:UC知道 时间:2024/05/13 05:58:51
GetDC(参数)

获得客户区的设备环境
CDC* CWnd::GetDC( );
返回值:
如果调用成功,则返回CWnd客户区的设备环境

由于CWnd已经表明了是哪个窗口的设备环境,所以该函数是无参的。

http://baike.baidu.com/view/1080533.htm

::GetDC(HWND)
如果是Win32的API,那么参数是窗口句柄。

如果是MFC,那么无参数。其实内部实现就是你用此函数的CWnd的句柄,包装了一下而已。

HDC GetDC(
HWND hWnd // handle to a window
);

The GetDC function retrieves a handle to a display device context 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 device context.

MSDN一查就查到了.

看msdn