CStatusBar::CreateEx

BOOL CreateEx( CWnd* pParentWnd**, DWORD** dwCtrlStyle = 0 ,
**    DWORD** dwStyle = WS_CHILD | WS_VISIBLE | CBRS_BOTTOM,
**    UINT** nID = AFX_IDW_STATUS_BAR );

Return Value

Nonzero if successful; otherwise 0.

Parameters

pParentWnd

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

dwCtrlStyle

Additional styles for the creation of the embedded CStatusBarCtrl object. For a complete list of supported styles, see dwStyle.

Status bar styles supported are:

  • SBARS_SIZEGRIP   The status bar control includes a sizing grip at the right end of the status bar. A sizing grip is similar to a sizing border; it is a rectangular area that the user can click and drag to resize the parent window.

  • SBT_TOOLTIPS   The status bar supports tooltips.

dwStyle

The status-bar style. Supported styles include:

  • SBARS_SIZEGRIP   The status bar control includes a sizing grip at the right end of the status bar. A sizing grip is similar to a sizing border; it is a rectangular area that the user can click and drag to resize the parent window.

  • SBT_TOOLTIPS   The status bar supports tooltips.

nID

The status bar’s child-window ID.

Remarks

Call this function to create a status bar (a child window) and associate it with the CStatusBar object. This function also sets the initial font and sets the status bar’s height to a default value.

Use CreateEx, instead of Create, when certain styles need to be present during the creation of the embedded status bar control. For example, set dwCtrlStyle to SBT_TOOLTIPS to display tooltips in a status bar object.

CStatusBar OverviewClass MembersHierarchy Chart