SaveDC

Syntax

int SaveDC(hDC)

This function saves the current state of the device context specified by the hDC parameter by copying state information (such as clipping region, selected objects, and mapping mode) to a context stack. The saved device context can later be restored by using the RestoreDC function.

Parameter Type/Description  

hDC HDC Identifies the device context to be saved.  

Return Value

The return value specifies the saved device context. It is zero if an error occurs.

Comments

The SaveDC function can be used any number of times to save any number of device-context states.