Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - How to handle different ribbons
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to handle different ribbons

 Post Reply Post Reply
Author
Message
Alex H. View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 February 2004
Status: Offline
Points: 266
Post Options Post Options   Thanks (0) Thanks(0)   Quote Alex H. Quote  Post ReplyReply Direct Link To This Post Topic: How to handle different ribbons
    Posted: 04 January 2013 at 4:33am
If you have different kind of ribbons in one application like e.g. Outlook.
What is the suggested way to handle this?
Do i have to create a new ribbon control or is it better to change the one and only ribbon?
Or can i create multiple ribbons and switch between them by showing only one of them at a time?

Thanks
Back to Top
Alex H. View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 February 2004
Status: Offline
Points: 266
Post Options Post Options   Thanks (0) Thanks(0)   Quote Alex H. Quote  Post ReplyReply Direct Link To This Post Posted: 10 January 2013 at 4:34am
Outlook 2010 uses multiple "Start" Tabs for different areas.
You can see it in the customization dialog:

So it looks like Outlook creates al Tabs at once and then shows/hides them on demand.
Question:
The Caption "Start" has a different display in the cutomization dialog. How can I get the same behaviour?

Back to Top
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 886
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Posted: 01 February 2013 at 5:48pm
We generally keep a single ribbon and empty it out and rebuild it when we switch document types or load a user's customized ribbon (UI layout).

I have also created a separate ribbon and loaded it for automation purposes. I ran into a few issues with that. I actually created a new CommandBars object and added the ribbon to it. I had to call SetSite (myFrame), call pCommandBars->EnableDocking() (or I crashed where CJ accessed NULL dockbar pointers) and I called pCommandBars->SetTheme. Also I had a problem with both ribbons trying to display (pRibbonBar->SetVisible(FALSE) took care of that).

I don't recall if I tried using the frame's CCommandBars object to create multiple ribbons but I wouldn't think that would be a problem. Generally I think you just have to know when to call SetVisible to undisplay one ribbon and display another.
Back to Top
Alex H. View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 February 2004
Status: Offline
Points: 266
Post Options Post Options   Thanks (0) Thanks(0)   Quote Alex H. Quote  Post ReplyReply Direct Link To This Post Posted: 13 March 2013 at 5:25am
Hello out there :-)
Has anyone found a solution for that?
@Codejock: If not: any plans to fix this problem in the next version?

Thanks


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.188 seconds.