Important: The information in this document is obsolete and should not be used for new development.
CloseDialog
To dismiss a dialog box for whose dialog record you allocated memory, use theCloseDialogprocedure.
PROCEDURE CloseDialog (theDialog: DialogPtr);
theDialog- A pointer to a dialog record.
DESCRIPTION
TheCloseDialogprocedure removes a dialog box from the screen and deletes it from the window list. TheCloseDialogprocedure releases the memory occupied by
Generally, you should provide memory for the dialog record of modeless dialog boxes when you create them. (You can let the Dialog Manager provide memory for modal and movable modal dialog boxes.) You should then use
- the data structures associated with the dialog box (such as its structure, content, and update regions)
- all the items in the dialog box (except for pictures and icons, which might be shared by other resources) and any data structures associated with them
CloseDialogto close a modeless dialog box when the user clicks the close box or chooses Close from the File menu.Because
CloseDialogdoes not dispose of the dialog resource or the item list
resource, it is important to make these resources purgeable. UnlikeGetNewDialog,NewColorDialogdoes not use a copy of the item list resource. Thus, if you
useNewColorDialogto create a dialog box, you may want to useCloseDialogto
keep the item list resource in memory even if you didn't supply a pointer to the memory.SEE ALSO
If you let the Dialog Manager allocate memory for the dialog box (by passingNILin thedStorageparameter to theGetNewDialog,NewColorDialog, orNewDialogfunction), use theDisposeDialogprocedure, described next, instead ofCloseDialog.