Share via


CDC::ResetDC

BOOLResetDC(constDEVMODE*lpDevMode);

Return Value

Nonzero if the function is successful; otherwise 0.

Parameters

lpDevMode

A pointer to a Windows DEVMODE structure.

Remarks

Call this member function to update the device context wrapped by the CDC object. The device context is updated from the information specified in the Windows DEVMODE structure.  This member function only resets the attribute device context.

An application will typically use the ResetDC member function when a window processes a WM_DEVMODECHANGE message. You can also use this member function to change the paper orientation or paper bins while printing a document.

You cannot use this member function to change the driver name, device name, or output port. When the user changes the port connection or device name, you must delete the original device context and create a new device context with the new information.

Before you call this member function, you must ensure that all objects (other than stock objects) that had been selected into the device context have been selected out.

CDC OverviewClass MembersHierarchy Chart

See Also   CDC::m_hAttribDC, , , DEVMODE