Important: The information in this document is obsolete and should not be used for new development.
MyDoPrintIdle
The printer driver for the current printer periodically calls an idle procedure while sending a document to the printer. The Printing Manager's default idle procedure allows the user to cancel printing. This procedure polls the keyboard and sets theiPrAbort
result code if the user presses Command-period to cancel the print job. However, the default idle procedure does not display a print status dialog box. It is up to the printer driver or your application to display a print status dialog box.Most printer drivers display their own status dialog boxes. However, your application can display its own status dialog box that reports the current status of the printing operation to the user. If it does, your status dialog box should allow the user to press Command-period to cancel the printing operation, and it may also provide a button allowing the user to cancel the printing operation. To handle update events in your status dialog box, Command-period keyboard events, and clicks in your Cancel button (if you provide one), you should provide your own idle procedure.
PROCEDURE MyDoPrintIdle;DESCRIPTION
As described in "Writing an Idle Procedure" beginning on page 9-35, you install your idle procedure in thepIdleProc
field of theTPrint
record. The printer driver runs your idle procedure periodically. It stops running once the entire document has been sent to the printer and does not run while the printer actually prints. The idle procedure takes no parameters and returns no result.SEE ALSO
See Figure 9-9 on page 9-12 for an example of an application-defined status dialog box. Listing 9-9 on page 9-37 illustrates an idle procedure. See "Writing an Idle Procedure" beginning on page 9-35 for complete information about providing your own idle procedure.