Re: Substituting the main menu bar(s)
- From: David Wilkinson <no-reply@xxxxxxxxxxxx>
- Date: Fri, 02 Jun 2006 14:34:59 -0400
David Webber wrote:
"David Wilkinson" <no-reply@xxxxxxxxxxxx> wrote in message news:%235KUCmYhGHA.1864@xxxxxxxxxxxxxxxxxxxxxxx
In a somewhat different context I do (in my InitInstance)
m_mainMenu[0].Attach(m_pMainWnd->GetMenu()->m_hMenu);
m_mainMenu[1].LoadMenu(IDR_MAINFRAME_1);
m_mainMenu[2].LoadMenu(IDR_MAINFRAME_2);
Now you can switch the main menu by calling SetMenu() on your main window.
I'll need to digest this.
What I was hoping for was a method of replacing the menu when no file is open, and replacing the menu when a document window is open, so that the usual MFC mechanism would display the correct one according to whether a document is open or not.
But instead of shoosing between the original two menus it would choose between my replacement pair.
Dave
Dave:
Yes, I don't do MDI. But Ajay seems to think this can be done.
David Wilkinson
.
- References:
- Substituting the main menu bar(s)
- From: David Webber
- Re: Substituting the main menu bar(s)
- From: David Wilkinson
- Re: Substituting the main menu bar(s)
- From: David Webber
- Substituting the main menu bar(s)
- Prev by Date: Re: CTreeCtrl tree collapses on focus
- Next by Date: Re: Command line compiler
- Previous by thread: Re: Substituting the main menu bar(s)
- Next by thread: Re: Substituting the main menu bar(s)
- Index(es):
Relevant Pages
|