Freigeben über


CMFCCaptionBar::Create

Creates the caption bar control and attaches it to the CMFCCaptionBar object.

BOOL Create(
   DWORD dwStyle,
   CWnd* pParentWnd,
   UINT uID,
   int nHeight=-1,
   BOOL bIsMessageBarMode=FALSE 
);

Parameters

  • dwStyle
    The logical OR combination of the caption bar styles.

  • pParentWnd
    The parent window of the caption bar control.

  • uID
    The ID of caption bar control.

  • nHeight
    The height, in pixels, of the caption bar control. If it is -1, the height is calculated according to the height of the icon, the text and the button that the caption bar control displays.

  • bIsMessageBarMode
    TRUE if the caption bar is in the message bar mode; FALSE otherwise.

Return Value

TRUE if the caption bar control is created successfully; FALSE otherwise.

Remarks

You construct a CMFCCaptionBar object in two steps. First you call the constructor, and then you call the Create method, which creates the Windows control and attaches it to the CMFCCaptionBar object.

Requirements

Header: afxcaptionbar.h

See Also

Reference

CMFCCaptionBar Class

Hierarchy Chart