Professional User Interface Suite, Copyright FOSS Software Inc. Help Published with Permission.

You can display a control bar including when it is auto hidden, tabbed or docked in two ways:

1) Specify the control bar's dialog control identifier in WPARAM of the WM_COMMAND message and send it to the main frame window

CMainFrame * pMainFrame = . . .;
CExtControlBar * pBar = . . .;
pMainFrame->SendMessage( WM_COMMAND, WPARAM( pBar->GetDlgCtrlID() ) );

2) Use the CExtControlBar::DoFrameBarCheckCmd() static method

CExtControlBar::DoFrameBarCheckCmd(
pMainFrame,
nBarID, // control bar's dialog control identifier
false
);

If you are using the auto-hide feature for control bars (i.e. you invoke the CExtControlBar::FrameInjectAutoHideAreas() method in CMainFrame::OnCreate()), do not forget to implement the following versions of MFC's OnBarCheck() and OnUpdateControlBarMenu() methods in the main frame window

BOOL CMainFrame::OnBarCheck(UINT nID)
{
return CExtControlBar::DoFrameBarCheckCmd( this, nID, false );
}

void CMainFrame::OnUpdateControlBarMenu( CCmdUI * pCmdUI )
{
CExtControlBar::DoFrameBarCheckUpdate( this, pCmdUI, false );