Partager via


CStatusBar::Create

Creates a status bar (a child window) and associates it with the CStatusBar object.

virtual BOOL Create(
   CWnd* pParentWnd,
   DWORD dwStyle = WS_CHILD | WS_VISIBLE | CBRS_BOTTOM,
   UINT nID = AFX_IDW_STATUS_BAR 
);

Parameters

  • pParentWnd
    Pointer to the CWnd object whose Windows window is the parent of the status bar.

  • dwStyle
    The status-bar style. In addition to the standard Windows styles, these styles are supported.

    • CBRS_TOP   Control bar is at top of frame window.

    • CBRS_BOTTOM   Control bar is at bottom of frame window.

    • CBRS_NOALIGN   Control bar is not repositioned when the parent is resized.

  • nID
    The toolbar's child-window ID.

Return Value

Nonzero if successful; otherwise 0.

Remarks

Also sets the initial font and sets the status bar's height to a default value.

Requirements

Header: afxext.h

See Also

Reference

CStatusBar Class

Hierarchy Chart

CStatusBar::SetIndicators

Other Resources

CStatusBar Members