CScrollBar::SetScrollRange

void SetScrollRange( int nMinPos, int nMaxPos, BOOL bRedraw = TRUE );

Parameters

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.

Remarks

Sets minimum and maximum position values for the given scroll bar. Set nMinPos and nMaxPos to 0 to hide 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 in 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. The default range for a scroll-bar control is empty (both nMinPos and nMaxPos are 0).

CScrollBar OverviewClass MembersHierarchy Chart

See Also   CScrollBar::GetScrollPos, CScrollBar::SetScrollPos, CScrollBar::GetScrollRange, ::SetScrollRange