Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

SaveDC function

The SaveDC function saves the current state of the specified device context (DC) by copying data describing selected objects and graphic modes (such as the bitmap, brush, palette, font, pen, region, drawing mode, and mapping mode) to a context stack.

Syntax


int SaveDC(
  _In_  HDC hdc
);

Parameters

hdc [in]

A handle to the DC whose state is to be saved.

Return value

If the function succeeds, the return value identifies the saved state.

If the function fails, the return value is zero.

Remarks

The SaveDC function can be used any number of times to save any number of instances of the DC state.

A saved state can be restored by using the RestoreDC function.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wingdi.h (include Windows.h)

Library

Gdi32.lib

DLL

Gdi32.dll

See also

Device Contexts Overview
Device Context Functions
RestoreDC

 

 

Community Additions

ADD
Show:
© 2015 Microsoft