Print Page | Close Window

Add a new menu

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=454
Printed Date: 27 September 2024 at 2:31pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Add a new menu
Posted By: davidbut
Subject: Add a new menu
Date Posted: 19 February 2004 at 10:26am

Hi,

I am currently evaluating Xtreme Command Bars with a view to using in our product. I have one requirement which I can't see how to do, that is to add a new menu to the menu bar, for example, to add a menu called Add-Ins between the Edit and View menus, I would then add menu items to this new empty menu. This could happen at any time while the product is running, and should not require the menu to be pulled down, so using OnInitCommandsPopup is not really an option.

Regards,

David

Licom Systems Ltd

 




Replies:
Posted By: SuperMario
Date Posted: 19 February 2004 at 11:20am
I have only used the ActiveX version, but I belive MFC has all of the features of ActiveX and more.  I think you could create all of the menubar items like you normally do, but add every menubar item that your application will ever use.  Now hide the menubar items that you do not want to see when the application starts.  You can then hide/unhide specific menubar controls.  So add them in the order you will eventually want them in.  For example, your menu starts out with File, Edit, Views, Help.  When you create the menu you create File, Edit, Views, Add-Ins, Tools, Window, Help.  After the menu is created, hide the Add-Ins, Tools, and Window controls.  When creating these menu controls you can use the same ideas the Dynamic Popups sample uses, only for the menu control.  In that example you can add and delete button controls from the split button popup without opening the menu.  Can someone familiar with the MFC version confirm this is possible?  Hope this helps


Posted By: Oleg
Date Posted: 23 February 2004 at 11:19am
GetCommandBars()->GetMenuBar()->GetControls()->Add. ..

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



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