Important: The information in this document is obsolete and should not be used for new development.
Creating and Disposing of Dialog Boxes
To create a dialog box, you should generally use theGetNewDialogfunction, 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 theNewDialogandNewColorDialogfunctions--for which you pass descriptive information in parameters--to create dialog boxes.The
NewColorDialogfunction is identical to theNewDialogfunction, except thatNewColorDialogreturns a pointer to a color graphics port.When you no longer need a dialog box, use the
CloseDialogprocedure if
you allocated the memory for the dialog record of the dialog box and use theDisposeDialogprocedure if you did not. (To merely make the dialog box invisible
to the user, you can use the Window Manager procedureHideWindow.)
Subtopics
- GetNewDialog
- NewColorDialog
- NewDialog
- CloseDialog
- DisposeDialog