BUG: Win95 GDI Resets Window/ViewportOrg in MM_TEXT Mode (152236)
The information in this article applies to:
- Microsoft Platform Software Development Kit (SDK) 1.0, when used with:
This article was previously published under Q152236 SYMPTOMS
An application marked as 3.1 will have its window origin and viewport
origin reset on Windows 95 when StartPage() is called and the device
context (DC) is in the MM_TEXT mapping mode.
This is a problem only in Windows 95 for both 16-bit and 32-bit
applications marked as 3.1.
CAUSE
This bug occurs when Enhanced metafiles (EMF) are used to print in Windows
95.
In Windows 95, all output to a non-Postsript printer spools as EMFs. While
EMF spooling or EMF banding, GDI fails to record the window or viewport
origins unless the mapping mode is set to something other than MM_TEXT.
This problem should not occur when printing to Postscript printers, because
these printers do not support spooling using EMFs.
RESOLUTION
The best way to work around this behavior is to call StartPage() before changing any DC attributes. Doing this guarantees that the DC attributes do not get reset regardless of the operating system or whether the application is marked 3.1 or 4.0.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
Modification Type: | Minor | Last Reviewed: | 7/11/2005 |
---|
Keywords: | kbbug kbpending KB152236 |
---|
|