Important: The information in this document is obsolete and should not be used for new development.
UpdateDialog
You can use theUpdateDialogprocedure to redraw the update region of a
specified dialog box. TheUpdateDialogprocedure is also available as theUpdtDialogprocedure.
PROCEDURE UpdateDialog (theDialog: DialogPtr; updateRgn: RgnHandle);
theDialog- A pointer to a dialog record.
updateRgn- A handle to the window region that needs to be updated.
DESCRIPTION
TheUpdateDialogprocedure redraws only the region in a dialog box specified in theupdateRgnparameter. Because theDialogSelect,ModalDialog,Alert,StopAlert,NoteAlert, andCautionAlertroutines automatically callDrawDialogto handle update events in your alert and dialog boxes, your application might never need to useUpdateDialog.Instead of drawing the entire contents of the specified dialog box,
UpdateDialogdraws only the items in the specified update region. You can useUpdateDialogin response to an update event, and you should usually bracket it by calls to the Window Manager proceduresBeginUpdateandEndUpdate. TheUpdateDialogprocedure uses the QuickDraw procedureSetPortto make the dialog box the current graphics port. For drawing controls,UpdateDialoguses the Control Manager procedureUpdateControls, which is faster than theDrawControlsprocedure.SEE ALSO
Listing 6-35 on page 6-99 illustrates the use ofUpdateDialogto respond to update events in a modeless dialog box. See the chapter "Window Manager" in this book for more information on update and activate events for windows. TheUpdateControls procedure is described in the chapter "Control Manager" in this book.