Important: The information in this document is obsolete and should not be used for new development.
SetDialogItem
After using theGetDialogItemprocedure to get a handle to an item from a dialog box, use theSetDialogItemprocedure to set or change the item. TheSetDialogItemprocedure is also available as theSetDItemprocedure.
PROCEDURE SetDialogItem (theDialog: DialogPtr; itemNo: Integer; itemType: Integer; item: Handle; box: Rect);
- theDialog
- A pointer to a dialog record.
itemNo- A number corresponding to the position of an item in the dialog box's item list resource.
itemType- A value that represents the type of item in the
itemNoparameter. To specify the value for this parameter, you can use any of the constants listed on page 6-114 for theitemTypeparameter of theGetDialogItemprocedure.item- For an application-defined item, a pointer to the draw procedure (coerced to a handle) for the item specified in the
itemNoparameter; for all other item types, a handle to the item.box- The display rectangle (described in coordinates local to the dialog box) for the item specified in the
itemNoparameter.DESCRIPTION
TheSetDialogItemprocedure sets the item specified by theitemNoparameter for the specified dialog box. This procedure installs the item without drawing it; typically you create an invisible dialog box, useSetDialogItem, then use the Window Manager procedureShowWindowto draw the dialog box and its items.SEE ALSO
Listing 6-16 on page 6-58 illustrates how to useSetDialogItemto install an application-defined draw procedure. TheShowWindow procedure is described in the chapter "Window Manager" of this book.