Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Switching MDI menus
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Switching MDI menus

 Post Reply Post Reply
Author
Message
JonN View Drop Down
Newbie
Newbie
Avatar

Joined: 11 January 2004
Location: United Kingdom
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote JonN Quote  Post ReplyReply Direct Link To This Post Topic: Switching MDI menus
    Posted: 11 January 2004 at 11:02am

Hi all,

I'm currently converting an existing MDI program in Visual Studio 6 to use the XTP command bars.  My problem is with MDI menus.  I need multiple menus to support a range of different docTemplates but it appears that I am limited to just one menu. 

I have read and tried to implement the MDI menu switching as described in the MDI menus sample, but this does not appear to work as expected when I implement the code in my own program.  In particular the  AssignDocTemplate() and ExcludeDocTemplate() options in the OnCreateControl() function do not actually assign or exclude the various menu items from my one 'master' menu.  Regardless of what I try I always get the same menu, the one needed for my default template.  It is almost as if the XTP menu is only reset when creating a new document, not when switching between various views of the same document.

At present I've implemented a switch menu function which is called whenver the doc template changes, much as suggested in the earlier Switching MDI menu posts.  This resets the menu to the correct one, much like standard MFC.  Although this works, it also prevents any user customisation of the menu bar, which I would also like to implement.  Ideally I'd like to use multiple menus, each with their own customisation.

It would seem that I'm slightly off the mark with this one, any suggestions as to where I'm going wrong?

Jon

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.