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


Creating and Disposing of Dialog Boxes

To create a dialog box, you should generally use the GetNewDialog function, which takes information about the dialog from a dialog resource in a resource file. Like window resources, dialog resources isolate descriptive information from your application code for ease of modification or translation to other languages. However, you can also use the NewDialog and NewColorDialog functions--for which you pass descriptive information in parameters--to create dialog boxes.

The NewColorDialog function is identical to the NewDialog function, except that NewColorDialog returns a pointer to a color graphics port.

When you no longer need a dialog box, use the CloseDialog procedure if
you allocated the memory for the dialog record of the dialog box and use the DisposeDialog procedure if you did not. (To merely make the dialog box invisible
to the user, you can use the Window Manager procedure HideWindow.)


Subtopics
GetNewDialog
NewColorDialog
NewDialog
CloseDialog
DisposeDialog

Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996