Switching MDI menus |
Post Reply |
Author | |
JonN
Newbie Joined: 11 January 2004 Location: United Kingdom Status: Offline Points: 8 |
Post Options
Thanks(0)
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 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |