BCGControlBar Pro for MFC
virtual BOOL CBCGPBaseControlBar::CreateEx ( DWORD  dwStyleEx,
LPCTSTR  lpszClassName,
LPCTSTR  lpszWindowName,
DWORD  dwStyle,
const RECT &  rect,
CWnd *  pParentWnd,
UINT  nID,
DWORD  dwBCGStyle = 0,
CCreateContext *  pContext = NULL 
)
virtual

Creates a Windows control.

Returns
Nonzero if the control bar has been created successfully; otherwise 0.

Creates a Windows control of lpszClassName class. If you specify WS_CAPTION among other styles it will be turned off and CBCGPBaseControlBar::m_bHasCaption is set to TRUE, because the library does not allow control bars with Windows captions.

You can use all combinations of Windows styles (allowed for child windows) and all MFC control bar (CBRS_) styles.

The library adds several new styles, you should specify them in dwBCGStyle:

  • CBRS_BCGP_FLOAT - control bar is floating.
  • CBRS_BCGP_AUTOHIDE - control bar can be switched to autohide mode.
  • CBRS_BCGP_RESIZE - control bar can be resized (used in CBCGPOutlookBar only, other bars are always resizable).
  • CBRS_BCGP_CLOSE - control bar can be closed (hidden).
  • CBRS_BCGP_AUTO_ROLLUP - control bar can be automatically rolled up when floating.
  • CBRS_BCGP_REGULAR_TABS - when another control bar is docking to a control bar having this style to create a tabbed window, a regular tabbed window is created (CBCGPTabbedControlBar).
  • CBRS_BCGP_OUTLOOK_TABS - when another control bar is docking to a control bar having this style to create a tabbed window, an outlook-style tabbed window is created (CBCGPOutlookBar).
Parameters
dwStyleExThe extended styles (see CWnd::CreateEx for more details).
lpszClassNameThe window class name.
lpszWindowNameThe window name.
dwStyleThe window style (see CWnd::CreateEx)
rectThe initial rectangle.
pParentWndA pointer to the parent window.
nIDSpecifies the control bar ID. Must be unique!
dwBCGStyleA special BCGP style.
pContextA pointer to CCreateContext