Professional UI Solutions
Site Map   /  Register


Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » From menu to ribbon Collapse All
Subject Author Date
Wilhelm Falkner Feb 29, 2012 - 2:01 AM

Dear support team,

like most of your customers, I have all my progs written with traditional menus. But as time goes by, I want now to switch to ribbons. Waht I’m missing ist a short tutorial, how to do this. Starting with a traditional MDI application, replacing now menu with ribbon. Not starting a new project!

And, like most of your customers, I’m not writing progs for myself. So I have to take care of existing customers, customers, they are using my progs for years. And like most of teh customers, they want to have new things, but don’t loose features.

So, what I want to do? Updating my existing progs, adding ribbon feature. But keep also old meu. Not displayed at the same time, but switchable.

You have articles, how to come from CDialg to CExtResizableDialog. Do you also have a description to come from menu to ribbon?



Technical Support Mar 1, 2012 - 8:58 AM

The ribbon bar replaces both a menu bar and toolbars. It’s possible to use toolbar resources for initializing ribbon icons because the ribbon bar is a very advanced version of a toolbar. But it’s not possible to use menu resources for initializing the ribbon bar’s content. A menu tree is not similar to a command tree, which is used by the ribbon bar. The top level of a menu tree does not exactly correspond to ribbon tabs. The ribbon uses additional types of items which are new: galleries, different types of button groups, an application menu in Office 2007 or a backstage view in Office 2010, quick access toolbar buttons and buttons on the right of tabs. Ribbon buttons also contain rules describing how a ribbon layout is compressed when there is not enough horizontal space to display all the buttons.

This means there is no conversion procedures between toolbars, menus and the ribbon bar. You can simply create a ribbon bar, initialize tab pages, button groups and buttons one by one until menu bar and toolbars will not be needed. Then remove menu bar and toolbar. You will need to think about how to organize and group your commands inside ribbon, which buttons should display menus, which buttons should appear as check boxes, where and whether to use galleries and what should be displayed in application menu or backstage view. You can copy paste ready to use functions initializing ribbon button groups from the RibbonBar sample application. But it’s much more important to design entire ribbon layout well. Some apps are small and they have no enough commands to fill even one ribbon tab page. You can use CExtRibbonPage control instead of CExtRibbonBar in such small apps.