3

I ported my MFC application to Feature pack.When i try to insert a new sub menu/popup menu to CMFCMenuBar, the menu items in "Window" menu gets duplicated. Kindly help me. I used the below code to insert submenu.

    CMenu* pMenu;
    HMENU hMenu = m_wndMenuBar.GetHMenu();

ASSERT(::IsMenu(hMenu));
pMenu = CMenu::FromHandle(hMenu);

pMenu = pMenu->GetSubMenu(2);   
pMenu->InsertMenu(2, MF_BYPOSITION ,
    (UINT)ID_SORTING_SORTBYACCESS, _T("My Menu"));

m_wndMenuBar.CreateFromMenu(hMenu, false, true);
  • Maybe this is a cache issue. Check your registry folder for that application. It is normally located under the Workspace subfolder. – sergiol Apr 08 '14 at 12:22

0 Answers0