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.
CScrollBar::Create
CScrollBar                                  Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  BOOL Create( DWORD dwStyle, const RECT& rect, CWnd* pParentWnd,
               UINT nID );
 
  Parameter    Description
 
  <dwStyle>    Specifies the scroll bar's style.
 
  <rect>       Specifies the scroll bar's size and position. Can be either
               a RECT structure or a CRect object.
 
  <pParentWnd> Specifies the scroll bar's parent window, usually a CDialog
               or CModalDialog object. It must not be NULL.
 
  <nID>        The scroll bar's resource ID.
 
  Remarks
 
  You construct a CScrollBar object in two steps. First call the
  constructor, which constructs the CScrollBar object, then call Create,
  which creates and initializes the associated Windows scroll bar and
  attaches it to the CScrollBar object.
 
  Apply the following window styles to a scroll bar:
 
  Style        Application
 
  WS_CHILD     Always.
 
  WS_VISIBLE   Usually.
 
  WS_DIABLED   Rarely.
 
  WS_GROUP     To group controls.
 
  WS_TABSTOP   To allow tabbing to reach this scroll bar control.
 
  Apply any combination of scroll-bar styles to the scroll bar.
 
  Return Value
 
  TRUE if successful; otherwise FALSE.
 
  See Also
 
  CScrollBar::CScrollBar
 
 
                                     -♦-