Microsoft Foundation Classes (mfc.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
CWnd::SetScrollPos
CWnd                                        Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  int SetScrollPos( int nBar, int nPos, BOOL bRedraw = TRUE );
 
  Parameter   Description
 
  <nBar>      Specifies the scroll bar to be set. It can be one of the
              following values:
 
              Value     Meaning
 
              SB_CTL    Sets the position of a scroll-bar control. In this
                        case, the CWnd must be a scroll-bar control.
 
              SB_HORZ   Sets the CWnd horizontal scroll-bar position.
 
              SB_VERT   Sets the CWnd vertical scroll-bar position.
 
  <nPos>      Specifies the new position. 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 FALSE, it is not redrawn.
 
  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.
 
  Setting <bRedraw> to FALSE is useful whenever the scroll bar will be
  redrawn by a subsequent call to another function.
 
  Return Value
 
  The previous position of the scroll box.
 
  See Also
 
  ::SetScrollPos, CWnd::GetScrollPos
 
 
                                     -♦-