Re: Substituting the main menu bar(s)

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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
.



Relevant Pages

  • Re: Substituting the main menu bar(s)
    ... Now you can switch the main menu by calling SetMenuon 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 ...
    (microsoft.public.vc.mfc)
  • Re: IEXPLORE caused invalid page fault
    ... You could try downloading and replacing ... >> Explorer window or just any file window, and at the top where it says ... >> spyware or malware, which can also cause this problem. ... >> How to make a good newsgroup post: ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: reinstallation of xp on another system
    ... If you drop the system out a 5th floor window you go an buy another system. ... As for replacing components you can upgrade whatever you deem necessary ... on a regular basis to steer away from OEM versions. ...
    (microsoft.public.windowsxp.basics)
  • Re: Cant X be elemenated?
    ... Don't point me at "experimental development systems". ... that's just now getting to the "display a window" stage. ... Any discussion of replacing X needs to understand why Berlin isn't the ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: replacing Miata top or window
    ... The zip in rear window can also be replaced. ... Again the rain rail will likely need replacing. ... be the best for me and the way I use the car. ...
    (rec.autos.makers.mazda.miata)