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 5 - Control Manager / Control Manager Reference
Control Manager Routines / Drawing Controls


DrawControls

Although you should generally use the UpdateControls procedure to update controls in a window, you can instead use the DrawControls procedure.

PROCEDURE DrawControls (theWindow: WindowPtr);
theWindow
A pointer to a window whose controls you want to display.
DESCRIPTION
The DrawControls procedure draws all controls currently visible in the specified window. The controls are drawn in reverse order of creation; thus, in case of overlapping controls, the control created first appears frontmost in the window.

Because the UpdateControls procedure redraws only those controls that need updating, your application should generally use it instead of DrawControls upon receiving an update event for a window that contains controls.

You should call either DrawControls or UpdateControls after calling the Window Manager procedure BeginUpdate and before calling EndUpdate.

SPECIAL CONSIDERATIONS
The Dialog Manager automatically draws and updates controls in alert boxes and
dialog boxes.

Window Manager routines such as SelectWindow, ShowWindow, and BringToFront do not automatically update the window's controls. They just add the appropriate regions to the window's update region, generating an update event.

SEE ALSO
See the chapter "Dialog Manager" in this book for more information about including controls in alert boxes and dialog boxes. See the chapter "Window Manager" in this book for more information about Window Manager routines.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996