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.
class CScrollBar
◄CWnd►                                        ◄Up► ◄Contents► ◄Index► ◄Back►
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  Description
 
  The CScrollBar class provides the functionality of a Windows scroll-bar
  control.
 
  You create a scroll-bar control in two steps. First, call the
  constructor CScrollBar to construct the CScrollBar object, then call the
  ◄Create► member function to create the scroll-bar control and attach it
  to the CScrollBar object.
 
  If you create a CScrollBar object within a dialog box (through a dialog
  resource), the CScrollBar is automatically destroyed when the user
  closes the dialog box.
 
  If you create a CScrollBar object within a window, you may also need to
  destroy it. If you create the CScrollBar object on the stack, it is
  destroyed automatically. If you create the CScrollBar object on the heap
  by using the new function, you must call delete on the object to destroy
  it when the user terminates the Windows scroll bar.
 
  If you allocate any memory in the CScrollBar object, override the
  CScrollBar destructor to dispose of the allocations.
 
  See Also
 
  ◄CWnd►, ◄CButton►, ◄CComboBox►, ◄CEdit►, ◄CListBox►, ◄CStatic►,
  ◄CModalDialog►, ◄CDialog►
 
  Public Members
 
  Construction/Destruction
 
  ◄CScrollBar►   Constructs a CScrollBar object.
 
  Initialization
 
  ◄Create►   Creates the Windows scroll bar and attaches it to the
             CScrollBar object.
 
  Operations
 
  ◄GetScrollPos►     Retrieves the current position of a scroll box.
 
  ◄SetScrollPos►     Sets the current position of a scroll box.
 
  ◄GetScrollRange►   Retrieves the current minimum and maximum scroll-bar
                     positions for the given scroll bar.
 
  ◄SetScrollRange►   Sets minimum and maximum position values for the
                     given scroll bar.
 
  Windows 3.1 Functions
 
  ◄ShowScrollBar►     Shows or hides a scroll bar.
 
  ◄EnableScrollBar►   Enables or disables one or both arrows of a scroll
                      bar.
 
 
                                     -♦-