Important: The information in this document is obsolete and should not be used for new development.
HideControl
To make a control invisible, before adjusting its size and location, for example, use theHideControl
procedure.
PROCEDURE HideControl (theControl: ControlHandle);
theControl
- A handle to the control you want to hide.
DESCRIPTION
TheHideControl
procedure makes the specified control invisible by changing the value of thecontrlVis
field of the control record and removing the control from the screen. To fill the region previously occupied by the control,HideControl
uses the background pattern of the window's graphics port. It also adds the control's rectangle to the window's update region, so that anything else that was previously obscured by the control will reappear on the screen. If the control is already invisible,HideControl
has no effect.To make the control visible again, you can use the
ShowControl
procedure.SPECIAL CONSIDERATIONS
TheMoveControl
andSizeControl
procedures both callHideControl
andShowControl
automatically. However, so that the control will not blink on the screen when you make both of these calls, you should useHideControl
to make the control invisible until you are finished manipulating it, and then useShowControl
.SEE ALSO
Listing 5-14 on page 5-36 illustrates the use ofHideControl
before adjusting scroll bar settings and locations.