The information in this article applies to:
SYMPTOMS
The RestoreDC() function returns failure when attempting to restore a printer Device Context (DC) that was saved by calling the SaveDC() function in Windows 95 version 4.0.
CAUSERestoreDC() fails if the specified state instance does not exist on the GDI instance stack. Specifically, RestoreDC() fails on a printer DC if the StartPage() function is called between a call to the SaveDC() and a call to RestoreDC(). The RestoreDC() function fails because the StartPage() function in Windows 95 deletes any DC state instances that have been saved for that DC. RESOLUTIONApplications use the StartPage() and EndPage() functions to indicate page separations on printer DCs. It is therefore necessary for applications written for Windows 95 to reinitialize a printer DC by selecting GDI objects and resetting mapping modes and other DC and GDI object attributes after every call to StartPage(). STATUSThis behavior is by design. MORE INFORMATION
When Windows 95-based applications print, they spool to Enhanced Metafile
(EMF) spool files by default. Spooling to an EMF requires a clean DC so
that each call to the StartPage() function restores the printer DC to its default state.
Additional query words: 4.00 Windows 95 difference blank page output
Keywords : kbSDKWin32 kbWinOS95 |
Last Reviewed: June 15, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |