CScrollBar::SetScrollPos

int SetScrollPos( int nPos, BOOL bRedraw = TRUE );

Return Value

Specifies the previous position of the scroll box if successful; otherwise 0.

Parameters

nPos

Specifies the new position for the scroll box. It must be within the scrolling range.

bRedraw

Specifies whether the scroll bar should be redrawn to reflect the new position. If bRedraw is TRUE, the scroll bar is redrawn. If it is FALSE, it is not redrawn. The scroll bar is redrawn by default.

Remarks

Sets the current position of a scroll box to that specified by nPos and, if specified, redraws the scroll bar to reflect the new position.

Set bRedraw to FALSE whenever the scroll bar will be redrawn by a subsequent call to another function to avoid having the scroll bar redrawn twice within a short interval.

CScrollBar OverviewClass MembersHierarchy Chart

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