1.8.6 Hiding a Standard Scroll Bar

For standard scroll bars, if the minimum and maximum values are equal, the scroll bar is hidden and, in effect, disabled. Using this technique, you can temporarily hide a scroll bar when it is not needed for the current contents of the client area.

The SetScrollRange function hides and disables a standard scroll bar when equal minimum and maximum values are specified. No scrolling requests can be made through the scroll bar when it is hidden. SetScrollRange enables the scroll bar and shows it again when it sets the minimum and maximum values to unequal values. The ShowScrollBar function can also be used to hide or show a scroll bar. It does not affect the scroll bar's range or scroll box's position.