Important: The information in this document is obsolete and should not be used for new development.
MyPrDialogAppend
If you customize a style or job dialog box, your application uses thePrDlgMainfunction to display the dialog box. In one of the parameters toPrDlgMain, 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 itMyPrDialogAppend:
FUNCTION MyPrDialogAppend (hPrint: THPrint): TPPrDlg;
hPrint- A handle to a
TPrintrecord (described on page 9-41).DESCRIPTION
YourMyPrDialogAppendfunction should use the Dialog Manager procedureAppendDITLto add items to the style or job dialog box for the document whoseTPrintrecord is passed in thehPrintparameter. As its function result, your function should return a pointer to theTPrDlgrecord (described on page 9-47) for the customized style or job dialog box.You can use the
PrStlInitorPrJobInitfunction (described on page 9-61 and page 9-62, respectively) to get an initializedTPrDlgrecord for the current printer.Your
MyPrDialogAppendfunction should install pointers to two functions in theTPrDlgrecord for this dialog box. Put a pointer to one function in thepFltrProcfield; 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 thepItemProcfield; 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 theMyPrDialogAppendfunction;
Listing 9-7 on page 9-34 shows how to pass the address of this function to thePrDlgMainfunction. See the chapter "Dialog Manager" in Inside Macintosh: Macintosh Toolbox Essentials for information about theAppendDITLprocedure and about handling events in dialog boxes.