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: Macintosh Toolbox Essentials /
Chapter 6 - Dialog Manager / Dialog Manager Reference
Dialog Manager Routines / Manipulating Items in Alert and Dialog Boxes


SetDialogItem

After using the GetDialogItem procedure to get a handle to an item from a dialog box, use the SetDialogItem procedure to set or change the item. The SetDialogItem procedure is also available as the SetDItem 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 the itemType parameter of the GetDialogItem 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
The SetDialogItem procedure sets the item specified by the itemNo parameter for the specified dialog box. This procedure installs the item without drawing it; typically you create an invisible dialog box, use SetDialogItem, then use the Window Manager procedure ShowWindow to draw the dialog box and its items.

SEE ALSO
Listing 6-16 on page 6-58 illustrates how to use SetDialogItem to install an application-defined draw procedure. The ShowWindow procedure is described in the chapter "Window Manager" of this book.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996