The Escape function allows an application to access some facilities of a particular device that are not directly available through GDI. When an application calls Escape for a printer device context, the printer functions regulate the flow of printer output from Windows applications, retrieve information about a printer, and alter the settings of a printer.
Following are the eight printer functions in Windows 3.1, which supersede many of the printer escapes:
Function | Description |
AbortDoc | Ends the current print job and erases everything drawn since the last call to the StartDoc function. |
EndDoc | Ends a print job. |
EndPage | Informs the printer that the application has finished writing to a page. |
QueryAbort | Informs the abort procedure for a printing application that a print job should be stopped. |
SetAbortProc | Sets the application-supplied abort procedure that allows a print job to be canceled during spooling. |
SpoolFile | Places a file into the spooler queue. |
StartDoc | Starts a print job. |
StartPage | Prepares the printer driver to begin accepting data. |
For information about printing from Windows applications, see the Microsoft Windows Guide to Programming.