Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Imaging With QuickDraw /
Chapter 9 - Printing Manager / Printing Manager Reference
Printing Manager Routines / Displaying and Customizing the Print Dialog Boxes


You can use the PrStlDialog function to display the style dialog box provided by the resource file for the current printer driver.

FUNCTION PrStlDialog (hPrint: THPrint): Boolean;
A handle to a TPrint record (described on page 9-41), which may be a new record or an existing one from a document.
The PrStlDialog function gets the initial settings to display in the style dialog box from the TPrint record specified in the hPrint parameter. The user specifies the page dimensions and other information needed for page setup through the style dialog box. Your application should display this dialog box when the user chooses Page Setup from the File menu.

If the user confirms the dialog box, the PrStlDialog function returns TRUE. The PrStlDialog function saves the results of the dialog box in the specified TPrint record and calls the PrValidate function (described on page 9-57). Otherwise, the TPrint record is left unchanged and the function returns FALSE.

You should never call PrStlDialog between the pages of a document.

You must call the PrOpen procedure (described on page 9-54) prior to calling PrStlDialog, and you must call the PrClose procedure (described on page 9-55) afterward, because the current printer driver must be open in order for your application to successfully call PrStlDialog.

The trap macro and routine selector for the PrStlDialog function are
Trap macroSelector

See Figure 9-3 on page 9-6 for an example of a style dialog box. For more information on the use of a style dialog box, see "Getting Printing Preferences From the User" beginning on page 9-5. For information on how to customize a style dialog box, see "Altering the Style or Job Dialog Box" beginning on page 9-32.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996