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
Application-Defined Routines /


MyPrDialogAppend

If you customize a style or job dialog box, your application uses the PrDlgMain function to display the dialog box. In one of the parameters to PrDlgMain, you pass the address of an initialization function that you use to append items--such as checkboxes and radio buttons--to the dialog box. Here is how might declare your initialization function if you were to name it MyPrDialogAppend:

FUNCTION MyPrDialogAppend (hPrint: THPrint): TPPrDlg;
hPrint
A handle to a TPrint record (described on page 9-41).
DESCRIPTION
Your MyPrDialogAppend function should use the Dialog Manager procedure AppendDITL to add items to the style or job dialog box for the document whose TPrint record is passed in the hPrint parameter. As its function result, your function should return a pointer to the TPrDlg record (described on page 9-47) for the customized style or job dialog box.

You can use the PrStlInit or PrJobInit function (described on page 9-61 and page 9-62, respectively) to get an initialized TPrDlg record for the current printer.

Your MyPrDialogAppend function should install pointers to two functions in the TPrDlg record for this dialog box. Put a pointer to one function in the pFltrProc field; this function should handle events (such as update events in background applications and disk-inserted events) that the Dialog Manager doesn't handle in a modal dialog box. Put a pointer to the second function in the pItemProc field; this function should handle events, such as mouse clicks, in the items added to the dialog box.

SEE ALSO
Listing 9-8 on page 9-34 shows an example of the MyPrDialogAppend function;
Listing 9-7 on page 9-34 shows how to pass the address of this function to the PrDlgMain function. See the chapter "Dialog Manager" in Inside Macintosh: Macintosh Toolbox Essentials for information about the AppendDITL procedure and about handling events in dialog boxes.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996