![]() |
Problem loading Menu's with Ribbon bar. |
Post Reply ![]() |
Author | |
sankulp80 ![]() Newbie ![]() Joined: 13 October 2009 Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() Posted: 13 October 2009 at 5:44am |
Hi,
I am loading menus with the Ribbon bars in the CommandBars. Menus are not showing up properly, they are apperaing below the ribbon bar. I need Menu to be shown above RibbonBar Please help me what wrong I am doing. Below is the code snippet: CXTPRibbonBar* pRibbonBar = (CXTPRibbonBar*)pCommandBars->Add(_T("The Ribbon"), xtpBarTop, RUNTIME_CLASS(CXTPRibbonBar)); if (!pRibbonBar) { return FALSE; } pRibbonBar->EnableDocking(TRUE); //pRibbonBar->GetTabPaintManager()->m_bSelectOnButtonDown = FALSE; CXTPMenuBar* pMenu = pCommandBars->SetMenu(_T("Menu Bar"), IDR_MAINFRAME); pMenu->SetPosition(xtpBarNone); CXTPControlPopup* pControlFile = (CXTPControlPopup*)pRibbonBar->AddSystemButton(ID_MENU_FILE); //pControlFile->SetCommandBar(menu.GetSubMenu(0)); pControlFile->GetCommandBar()->SetIconSize(CSize(32, 32)); //pControlFile->SetIconId(IDB_GEAR); UINT uCommand = {IDB_GEAR}; pCommandBars->GetImageManager()->SetIcons(IDB_GEAR, &uCommand, 1, CSize(0, 0), xtpImageNormal); CXTPRibbonTab* pTabHome = pRibbonBar->AddTab(ID_TAB_HOME); I am attching Image also...please look at the image Thanks in advance, Yogi |
|
![]() |
|
rdhd ![]() Senior Member ![]() ![]() Joined: 13 August 2007 Location: United States Status: Online Points: 899 |
![]() ![]() ![]() ![]() ![]() |
Can you manually move the menu above the ribbon bar (I see the gripper)? If not, that might imply it is not possible to do.
Have you tried creating the menu first (I assume SetPosition(xtpBarTop) is an option when doing so)?
|
|
![]() |
|
zaksoft ![]() Senior Member ![]() ![]() Joined: 05 June 2003 Location: Italy Status: Offline Points: 162 |
![]() ![]() ![]() ![]() ![]() |
I think this is not allowed by Microsoft licence, read it carefully, you cannot mix ribbon with old items, in the same way you cannot modify icons dimension and so on.
Interface is copyrighted and you have to agree in full to their requirements-
|
|
VS2022 - MFC MBCS Statically linked
XTP 23.1 Static Link --------------------------------------------------------- Davide Zaccanti - ZakSoft - www.zaksoft.com |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
yes its Ribbon thing to show always above all menus/toolbars.
Why do you need Ribbon if you whant standard MenuBar too.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
sankulp80 ![]() Newbie ![]() Joined: 13 October 2009 Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() |
Have you tried creating the menu first (I assume SetPosition(xtpBarTop) is an option when doing so)?
Hi I cannot move the menu above the ribbon bar. I also tried creating menus before creating RibbonBar. In this case I faced following issues: - In an MDI application multiple Min,Max and Close button show up - No Titlebar in the application - Cannot Maximize and Change Window Size by double clicking on the Title of the window. - Icon of the Windows appears below the MenuBar. should be in parllel to Menus as no Title Bar Please check the Attached Image. |
|
![]() |
|
sankulp80 ![]() Newbie ![]() Joined: 13 October 2009 Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() |
It's my client's requirements that both RibbonBar and MenuBar should show up. They should be toglled OFF/ON based using some keys.
I saw both Ribbon and Standard menu's in some applications. |
|
![]() |
|
rdhd ![]() Senior Member ![]() ![]() Joined: 13 August 2007 Location: United States Status: Online Points: 899 |
![]() ![]() ![]() ![]() ![]() |
I don't know if you can call ShowWindow(SW_HIDE) on the ribbon. You might be able to delete the ribbon and create the menu and vica versa on the fly. Do any of the samples do such a thing? We had a standard MFC menu at the top of our frame when we first moved to CJ (didn't bother to remove it). The ribbon did not always hide it properly so we removed the menu (we were not using it).
|
|
![]() |
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 |