An application sends the SBM_SETPOS message to a scroll bar control to set the position of the scroll box (thumb) and, if requested, redraw the scroll bar to reflect the new position of the scroll box.
SBM_SETPOS
wParam = (WPARAM) nPos; // new position of scroll box
lParam = (LPARAM) (BOOL) fRedraw; // redraw flag
If the position of the scroll box changed, the return value is the previous position of the scroll box; otherwise, it is zero.
If the scroll bar control is redrawn by a subsequent call to another function, setting the fRedraw parameter to FALSE is useful.
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Requires version 2.0 or later.
Header: Declared in winuser.h.
Scroll Bars Overview, Scroll Bar Messages, SBM_GETPOS, SBM_GETRANGE, SBM_SETRANGE, SBM_SETRANGEREDRAW