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 / Handling Events in Dialog Boxes


UpdateDialog

You can use the UpdateDialog procedure to redraw the update region of a
specified dialog box. The UpdateDialog procedure is also available as the UpdtDialog 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
The UpdateDialog procedure redraws only the region in a dialog box specified in the updateRgn parameter. Because the DialogSelect, ModalDialog, Alert, StopAlert, NoteAlert, and CautionAlert routines automatically call DrawDialog to handle update events in your alert and dialog boxes, your application might never need to use UpdateDialog.

Instead of drawing the entire contents of the specified dialog box, UpdateDialog draws only the items in the specified update region. You can use UpdateDialog in response to an update event, and you should usually bracket it by calls to the Window Manager procedures BeginUpdate and EndUpdate. The UpdateDialog procedure uses the QuickDraw procedure SetPort to make the dialog box the current graphics port. For drawing controls, UpdateDialog uses the Control Manager procedure UpdateControls, which is faster than the DrawControls procedure.

SEE ALSO
Listing 6-35 on page 6-99 illustrates the use of UpdateDialog 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. The UpdateControls procedure is described in the chapter "Control Manager" in this book.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996