static Handle GetDeviceContext(Handle Window)

This function obtains a device context for the client area of a window or for the entire screen.


Handle Window

The handle of the window for which a device context is required. If null is specified, a device context for the entire screen is obtained.



The handle of the new device context.


This function obtains:

The type of device context that is obtained depends upon the class style of the window. Common device contexts are assigned default attributes each time one is obtained. Previous attributes are assigned unchanged to class and private device contexts.

After painting with a common device context, the function ReleaseDeviceContext should be called. Class and private device contexts do not have to be released.


Name Space IPlusPlus::Graphics
Class Gdi
Assembly IPlusPlus.WinPlus.dll