CDC::SaveDC 

virtual int SaveDC( );

Return Value

An integer identifying the saved device context. It is 0 if an error occurs. This return value can be used to restore the device context by calling RestoreDC.

Remarks

Saves the current state of the device context by copying state information (such as clipping region, selected objects, and mapping mode) to a context stack maintained by Windows. The saved device context can later be restored by using RestoreDC.

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

CDC OverviewClass MembersHierarchy Chart

See Also   CDC::RestoreDC, ::SaveDC