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

The docking menu bar is implemented just as an ordinary toolbar. Any needed initialization should be performed in your CMainFrame's OnCreate() handler. Moreover, you need to add a frame window class member of CExtMenuControlBar class.

...
if( !m_wndMenuBar.Create( _T( "Menubar name" ),
this, ID_VIEW_MENUBAR)||
!m_wndMenuBar.LoadMenuBar( IDR_MAINFRAME ))
{
TRACE0( _T( "Failed to create menubar\n" ) );
return -1;
}
...
m_wndMenuBar.EnableDocking( CBRS_ALIGN_ANY );
...
CExtControlBar::FrameEnableDocking( this );
...
DockControlBar( &m_wndMenuBar );
...

By default, CExtMenuControlBar does not activate menu on pressing the ALT key. To enable this, you should override the PreTranslateMessage() virtual function in a frame window class and add the following lines before the parent PreTranslateMessage():

if( m_wndMenuBar.TranslateMainFrameMessage( pMsg ) ) return TRUE;

In case of MDI, repeat the same in the child frame window class.