Print Page | Close Window

Switching MDI menus

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=349
Printed Date: 28 April 2024 at 6:53pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Switching MDI menus
Posted By: JonN
Subject: Switching MDI menus
Date 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




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net