Important: The information in this document is obsolete and should not be used for new development.
UpdateDialog
You can use theUpdateDialog
procedure to redraw the update region of a
specified dialog box. TheUpdateDialog
procedure is also available as theUpdtDialog
procedure.
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
TheUpdateDialog
procedure redraws only the region in a dialog box specified in theupdateRgn
parameter. Because theDialogSelect
,ModalDialog
,Alert
,StopAlert
,NoteAlert
, andCautionAlert
routines automatically callDrawDialog
to 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,
UpdateDialog
draws only the items in the specified update region. You can useUpdateDialog
in response to an update event, and you should usually bracket it by calls to the Window Manager proceduresBeginUpdate
andEndUpdate
. TheUpdateDialog
procedure uses the QuickDraw procedureSetPort
to make the dialog box the current graphics port. For drawing controls,UpdateDialog
uses the Control Manager procedureUpdateControl
s, which is faster than theDrawControls
procedure.SEE ALSO
Listing 6-35 on page 6-99 illustrates the use ofUpdateDialog
to 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. TheUpdateControl
s procedure is described in the chapter "Control Manager" in this book.