Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ResetDC function

The ResetDC function updates the specified printer or plotter device context (DC) using the specified information.

Syntax


HDC ResetDC(
  _In_  HDC hdc,
  _In_  const DEVMODE *lpInitData
);

Parameters

hdc [in]

A handle to the DC to update.

lpInitData [in]

A pointer to a DEVMODE structure containing information about the new DC.

Return value

If the function succeeds, the return value is a handle to the original DC.

If the function fails, the return value is NULL.

Remarks

An application will typically use the ResetDC function when a window receives a WM_DEVMODECHANGE message. ResetDC can also be used to change the paper orientation or paper bins while printing a document.

The ResetDC function cannot be used to change the driver name, device name, or the output port. When the user changes the port connection or device name, the application must delete the original DC and create a new DC with the new information.

An application can pass an information DC to the ResetDC function. In that situation, ResetDC will always return a printer DC.

ICM: The color profile of the DC specified by the hdc parameter will be reset based on the information contained in the lpInitData member of the DEVMODE structure.

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

Unicode and ANSI names

ResetDCW (Unicode) and ResetDCA (ANSI)

See also

Device Contexts Overview
Device Context Functions
DeviceCapabilities
DEVMODE
Escape

 

 

Community Additions

Show:
© 2014 Microsoft