StartPage/EndPage Resets Printer DC Attributes in Windows 95

Last reviewed: September 29, 1995
Article ID: Q125696
The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API) included with:

        - Microsoft Windows 95 version 4.0
    

When you print under Windows version 3.x, the printer device context attributes, including things like mapping modes, current pen, current brush, and so on, are reset to their defaults for the device when the end of a page is reached. The escapes NEWFRAME and NEXTBAND and the API EndPage all cause the printer device context to be reset.

When you print under Windows NT version 3.x, the printer device context attributes are not reset during a print job.

When you print under Windows 95, the point at which the printer device context is reset to the default attributes depends on what version the executable was marked as. For executables marked as 3.x, the printer device context will be reset when EndPage is called. For executables marked as 4.0, the printer device context will be reset when StartPage is called. This applies to both 16-bit-based and Win32-based executables running under Windows 95.

A 16-bit-based executable's version can be set by using the Resource compiler's /xx switch where xx is 30, 31, or 40. A Win32-based executable's version can be set by using the /SUBSYSTEM:windows,x.x linker switch.


Additional reference words: 4.00
KBCategory: kbprint
KBSubcategory: GdiPrn


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 29, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.