Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2010
Visual Studio
Visual C++
MFC
MFC Classes
CWnd Class
 CWnd::SetScrollPos
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2010/.NET Framework 4

Other versions are also available for the following:
Visual Studio 2010 - Visual C++
CWnd::SetScrollPos

Sets the current position of a scroll box and, if requested, redraws the scroll bar to reflect the new position of the scroll box.

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

Specifies the scroll bar to be set. This parameter can be either of the following:

  • SB_HORZ   Sets the position of the scroll box in the horizontal scroll bar of the window.

  • SB_VERT   Sets the position of the scroll box in the vertical scroll bar of the window.

nPos

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

bRedraw

Specifies whether the scroll bar should be repainted to reflect the new scroll-box position. If this parameter is TRUE, the scroll bar is repainted; if FALSE, the scroll bar is not repainted.

The previous position of the scroll box.

Setting bRedraw to FALSE is useful whenever the scroll bar will be redrawn by a subsequent call to another function.

Header: afxwin.h

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker