Device-context functions create, delete, and restore device contexts (DC). A device context is a link between a Windows application, a device driver, and an output device, such as a printer or plotter. Windows maintains a cache of special DCs for the system display. The functions GetDC and ReleaseDC obtain and release these special DCs.
Any Windows application can use GDI functions to access an output device. GDI passes calls (which are device independent) from the application to the device driver. The device driver then translates the calls into device-dependent operations.
The Device Context functions include:
Function | Description |
CreateCompatibleDC | Creates a memory device context |
CreateDC | Creates a device context |
CreateIC | Creates an information context |
DeleteDC | Deletes a device context |
GetDCOrg | Retrieves the origin of a specified device context |
ResetDC | Updates a device context |
RestoreDC | Restores a device context |
SaveDC | Saves the current state of the device context |
WindowFromDC | Returns the window associated with the DC. |