I am upgrading my VC6 app to new mfc feature pack, I have to add a CMFCMenuBar on a dialog box, I am able to add and display the menu bar, but none of its pop up menu items work.... All the menu items in dropdwn/popup menu in menu bar are disabled and not responding to any message... after adding message handler functions, anybody has any idea?? I am posting my code to create and display menubar (CMFCMenuBar) on a dialog box here. I have tried to put this code within OnInitDialog() as well as OnCreate() function of the dialog class. m_wndMenuBar is a CMFCMenuBar object decleraed in .h file. if (!m_wndMenuBar.Create(this)) { TRACE0("Failed to create menubar\n"); return -1; // fail to create } CMenu *menu = new CMenu(); menu -> LoadMenu (IDR_ITEM_MENU); m_wndMenuBar.CreateFromMenu(menu->GetSafeHmenu(),TRUE,TRUE); m_wndMenuBar.SetDefaultMenuResId(IDR_ITEM_MENU); m_wndMenuBar.SetWindowPos(NULL,0, 0 ,500,30,SWP_SHOWWINDOW);
Never complain,never explain,just do your work.