ResetDC function
Applies to: desktop apps only
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 |
|---|---|
|
Minimum supported server | Windows 2000 Server |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names | ResetDCW (Unicode) and ResetDCA (ANSI) |
See also
Send comments about this topic to Microsoft
Build date: 3/7/2012