Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This message is sent by an application 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.

Syntax

SBM_SETPOS 
wParam = (WPARAM) 
nPos; 

lParam = (LPARAM) (BOOL) 
fRedraw; 

Parameters

nPos

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

fRedraw

Boolean value that specifies whether the scroll bar should be redrawn to reflect the new scroll box position. If set to TRUE, the scroll bar is redrawn. If set to FALSE, the scroll bar is not redrawn.

Return Value

If the position of the scroll box changed, the return value is the previous position of the scroll box; otherwise, it is zero.

Remarks

If the scroll bar control is redrawn by a subsequent call to another function, setting the fRedrawparameter to FALSE is useful.

Requirements

Header commctrl.h
Windows Embedded CE Windows CE 2.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also