◄Up► ◄Next► ◄Previous► ──────────────────────────────────────────────────────────────────────────── #define INCL_WINWINDOWMGR HDC WinOpenWindowDC(hwnd) HWND hwnd; /* handle of the window */ The WinOpenWindowDC function opens a device context for a window. Parameter Description ──────────────────────────────────────────────────────────────────────────── hwnd Identifies the window with the device context. Return Value The return value is the handle of the device context. Comments Only one device context can be opened for each window. A handle to a device context is used to associate a presentation space with the window. The window device context is automatically closed when its associated window is destroyed. It must not be closed with the DevCloseDC function. This function is used by applications that typically have a lot of state information associated with a presentation space, such as coordinate mapping transforms, attributes, fonts, etc. This interface provides a "global" presentation space for a given window. This global can be kept in the application until the window is destroyed. See Also WinQueryWindowDC ♦