I am using MFC in Visual Studio 2008. I have a CMDIFrameWndEx which has a CMFCMenuBar as the app-wizard provides.
I also have a menu resource, IDR_SCENE.
At runtime, I want to add the IDR_SCENE menu dynamically to the main menu bar. Declaring the menu in my class:
I then try and insert it like this during creation:
::InsertMenu(pParentWnd->GetMenuBar().GetHMenu(), 0, MF_BYPOSITION | MF_POPUP, reinterpret_cast<UINT_PTR>((HMENU)(*m_sceneMenu.GetSubMenu(0))), NULL);
But, I never, ever see it. No errors occur. I have done some searching and this appears to be the way to do it.
Can anyone assist?
Thanks in advance