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 thePrDlgMain
function 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
TPrint
record (described on page 9-41).DESCRIPTION
YourMyPrDialogAppend
function should use the Dialog Manager procedureAppendDITL
to add items to the style or job dialog box for the document whoseTPrint
record is passed in thehPrint
parameter. As its function result, your function should return a pointer to theTPrDlg
record (described on page 9-47) for the customized style or job dialog box.You can use the
PrStlInit
orPrJobInit
function (described on page 9-61 and page 9-62, respectively) to get an initializedTPrDlg
record for the current printer.Your
MyPrDialogAppend
function should install pointers to two functions in theTPrDlg
record for this dialog box. Put a pointer to one function in thepFltrProc
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 thepItemProc
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 theMyPrDialogAppend
function;
Listing 9-7 on page 9-34 shows how to pass the address of this function to thePrDlgMain
function. See the chapter "Dialog Manager" in Inside Macintosh: Macintosh Toolbox Essentials for information about theAppendDITL
procedure and about handling events in dialog boxes.