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);