Important: The information in this document is obsolete and should not be used for new development.
DrawControls
Although you should generally use theUpdateControlsprocedure to update controls in a window, you can instead use theDrawControlsprocedure.
PROCEDURE DrawControls (theWindow: WindowPtr);
theWindow- A pointer to a window whose controls you want to display.
DESCRIPTION
TheDrawControlsprocedure 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
UpdateControlsprocedure redraws only those controls that need updating, your application should generally use it instead ofDrawControlsupon receiving an update event for a window that contains controls.You should call either
DrawControlsorUpdateControlsafter calling the Window Manager procedureBeginUpdateand before callingEndUpdate.SPECIAL CONSIDERATIONS
The Dialog Manager automatically draws and updates controls in alert boxes and
dialog boxes.Window Manager routines such as
SelectWindow,ShowWindow, andBringToFrontdo 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.