I have a CExtResizableDialog and I need to put on it a CExtMenuBar together a CExtToolControlBar. I followed all the instructions as described in the online documentation, in the dialog I put two custom controls of type class ProfUIS-ControlBar respectively for the menubar and the toolbar. Both controls style value is set to 0x56402034. I used the DDX_Control method for both controls and the following is the source code I wrote in the OnInitDialog() function <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p> </o:p>
CExtResizableDialog::OnInitDialog();<o:p></o:p>
<o:p></o:p>
CWinApp *pApp = AfxGetApp();<o:p></o:p>
VERIFY(<o:p></o:p>
g_CmdManager->UpdateFromMenu(<o:p></o:p>
pApp->m_pszProfileName,<o:p></o:p>
IDR_MENU_CWAYS<o:p></o:p>
)<o:p></o:p>
);<o:p></o:p>
VERIFY(<o:p></o:p>
g_CmdManager->UpdateFromToolBar(<o:p></o:p>
pApp->m_pszProfileName,<o:p></o:p>
IDR_TOOLBAR_CWAYS<o:p></o:p>
)<o:p></o:p>
);<o:p></o:p>
<o:p> </o:p>
CString szTitle, szMessage;<o:p></o:p>
<o:p> </o:p>
ASSERT( m_wndMenuBar.GetSafeHwnd() != NULL );<o:p></o:p>
if( !m_wndMenuBar.LoadMenuBar(IDR_MENU_CWAYS) ) {<o:p></o:p>
ASSERT(FALSE);<o:p></o:p>
return FALSE;<o:p></o:p>
}<o:p></o:p>
<o:p> </o:p>
ASSERT( m_wndToolBar.GetSafeHwnd() != NULL );<o:p></o:p>
if( !m_wndToolBar.LoadToolBar(IDR_TOOLBAR_CWAYS) )<o:p></o:p>
{<o:p></o:p>
TRACE0("Failed to create colorways toolbar\n");<o:p></o:p>
return -1; // fail to create<o:p></o:p>
}<o:p></o:p>
m_wndToolBar.SetWindowText(_T("Colorways toolbar") );<o:p></o:p>
<o:p> </o:p>
// show gripper<o:p></o:p>
ShowSizeGrip();<o:p></o:p>
<o:p> </o:p>
. . .<o:p></o:p>
. . .<o:p></o:p>
<o:p> </o:p>
CWnd::RepositionBars(0, 0xffff, 0);<o:p></o:p>
return FALSE;<o:p></o:p>
<o:p> </o:p>
<o:p></o:p>
The problem is that I just can see the menu bar and the room space left for the tool bar. I also can see the toolbar’s buttons highlighted when I move the cursor onto those ones which have been checked directly from the toolbar or from the menu bar.<o:p></o:p>