Important: The information in this document is obsolete and should not be used for new development.
SetDialogItem
After using theGetDialogItem
procedure to get a handle to an item from a dialog box, use theSetDialogItem
procedure to set or change the item. TheSetDialogItem
procedure is also available as theSetDItem
procedure.
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
itemNo
parameter. To specify the value for this parameter, you can use any of the constants listed on page 6-114 for theitemType
parameter of theGetDialogItem
procedure.item
- For an application-defined item, a pointer to the draw procedure (coerced to a handle) for the item specified in the
itemNo
parameter; 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
itemNo
parameter.DESCRIPTION
TheSetDialogItem
procedure sets the item specified by theitemNo
parameter 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 procedureShowWindow
to draw the dialog box and its items.SEE ALSO
Listing 6-16 on page 6-58 illustrates how to useSetDialogItem
to install an application-defined draw procedure. TheShowWindow procedure is described in the chapter "Window Manager" of this book.