CScrollBar::SetScrollPos
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.
int SetScrollPos(
int nPos,
BOOL bRedraw = TRUE
);
Параметры
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.
Возвращаемое значение
Specifies the previous position of the scroll box if successful; otherwise 0.
Заметки
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.
Пример
See the example for CScrollBar::SetScrollRange.
Требования
Header: afxwin.h