![]() |
LoadCommandBars problem if Ribbon and Menu present |
Post Reply
|
| Author | |
robin_l
Senior Member
Joined: 15 October 2006 Status: Offline Points: 117 |
Post Options
Thanks(0)
Quote Reply
Topic: LoadCommandBars problem if Ribbon and Menu presentPosted: 04 February 2007 at 10:35am |
|
I'm incorporating a ribbon into an existing app, so want to give users the option of having the "old" look (menus plus toolbars) or the "new" one (ribbon). For this reason, I want to load menus, toolbars AND a ribbon and let users turn off whatever they don't want to see. Although this largely works, there is a redraw problem when both ribbon and menu are present together, which appears after SaveCommandBars/LoadCommandBars restores the screen layout. This effect is present in versions 10.4.0 and 10.4.2.
To show this I've taken the RibbonMDISample, added a menu bar:
plus an OnClose handler to save the command bar state
The first time the program runs, the expected appearance is found:
![]() However, after re-running the program, at which point LoadCommandBars attempts to restore the appearance, what we get is the following, where the menu bar is positioned at the very top of the window:
![]() Any chance of correcting this? The sample project showing the bug is here: uploads/20070204_102933_Bug_in_LoadComm.zip
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 05 February 2007 at 1:37am |
|
Hi, try to set another id for menu bar:
pMenuBar->SetBarID(2);
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
robin_l
Senior Member
Joined: 15 October 2006 Status: Offline Points: 117 |
Post Options
Thanks(0)
Quote Reply
Posted: 05 February 2007 at 3:16am |
|
Excellent! That works a treat.
Many thanks.
|
|
![]() |
|
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 |