DrawControls
DrawControls draws all of a window's currently active and visible controls. This (or UpdtControl) should be used upon detecting an update event for a window that contains controls.
theWindow is a pointer to a 108-byte GrafPort structure (actually a 156-byte
Notes: This can be used at any time to draw the controls in a window. It works by
drawing all the controls, and letting the off-screen or covered controls be
clipped. The 128K ROM UpdtControl function is more efficient since it doesn't waste time drawing outside of the window's visible region.
The most common usage is to call DrawControls to redraw scroll bars upon detecting an update event as in this code skeleton:
switch ( myEvent.what ) {
updtWin = (WindowPtr)myEvent. message;
MyDrawWin( updtWin); /* draw window contents */
. ... etc ...
.
}
}
The ’size icon' (if used) is also part of the content region of a window and
will need to be redrawn when it is uncovered.