INFO: Printer Escapes Under Windows 95

ID: Q125692

4.00 WINDOWS kbprint
The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API), used with:
    • Microsoft Windows 95


SUMMARY

Printer escapes are used to access special printer device features and have been used widely in Windows version 3.x. With Windows 95, Microsoft is encouraging application developers to move away from these escapes by providing GDI functionality to replace them.

For example, a Win32-based application should not call the NEXTBAND and BANDINFO escapes. Banding is no longer needed in Windows 95. Most of these escapes, however, are still provided for 16-bit-based applications for backwards compatibility. The only recommended escapes for 32-bit, Windows 95-based applications are the QUERYESCSUPPORT and PASSTHROUGH escapes.


MORE INFORMATION

Applications written for Windows version 3.x can use the QUERYESCSUPPORT and the PASSTHROUGH escapes, as well as the following 10 escapes. It is important to note that these escapes are only supported for backwards compatibility. All new Windows 95-based applications should use Win32 API that replaces these escapes:


   ABORTDOC
   ENDDOC
   GETPHYSPAGESIZE
   GETPRINTINGOFFSET
   GETSCALINGFACTOR
   NEWFRAME
   NEXTBAND
   SETABORTPROC
   SETCOPYCOUNT
   STARTDOC 
The following functions should always be used in place of a printer escape:

   Function       Printer Escape Replaced
   ----------------------------------------
   AbortDoc       ABORTDOC
   EndDoc         ENDDOC
   EndPage        NEWFRAME
   SetAbortProc   SETABORTPROC
   StartDoc       STARTDOC 
Windows 95 provides six new indexes for the GetDeviceCaps function that replace some additional printer escapes:

   Index for GetDeviceCaps   Printer Escape Replaced
   --------------------------------------------------------
   PHYSICALWIDTH             GETPHYSPAGESIZE
   PHYSICALHEIGHT            GETPHYSPAGESIZE
   PHYSICALOFFSETX           GETPRINTINGOFFSET
   PHYSICALOFFSETY           GETPRINTINGOFFSET
   SCALINGFACTORX            GETSCALINGFACTOR
   SCALINGFACTORY            GETSCALINGFACTOR 


Although a lot of the escapes have been replaced with Win32 GDI equivalent APIs, not all device-dependent escapes have been replaced. It is up to the printer driver manufacturer to decide whether or not its Windows 95-based driver will contain device-specific escapes that were present in its Windows version 3.x driver. An example of a device-specific escape would be the Windows version 3.x PostScript driver's POSTSCRIPT_IGNORE escape. Before calling any of these escapes, an application must first call the QUERESCSUPPORT escape to find out if the escape is supported or not.

Additional query words: 4.00

Keywords : kbSDKWin32 kbWinOS95 kbDSupport
Version : winnt:
Platform : winnt
Issue type : kbinfo


Last Reviewed: July 7, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.