void SetScrollRange( int nMinPos, int nMaxPos, BOOL bRedraw = TRUE );
nMinPos
Specifies the minimum scrolling position.
nMaxPos
Specifies the maximum scrolling position.
bRedraw
Specifies whether the scroll bar should be redrawn to reflect the change. If bRedraw is TRUE, the scroll bar is redrawn; if FALSE, it is not redrawn. It is redrawn by default.
Sets minimum and maximum position values for the given scroll bar. Set nMinPos and nMaxPos to 0 to hide or show standard scroll bars.
Do not call this function to hide a scroll bar while processing a scroll-bar notification message.
If a call to SetScrollRange immediately follows a call to the SetScrollPos member function, set bRedraw to SetScrollPos to 0 to prevent the scroll bar from being redrawn twice.
The difference between the values specified by nMinPos and nMaxPos must not be greater than 32,767.
CScrollBar::SetScrollPos, CScrollBar::GetScrollRange, ::SetScrollRange