Print Page | Close Window

Ribbon Sample

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=7322
Printed Date: 14 July 2025 at 8:10am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Ribbon Sample
Posted By: coldjoke
Subject: Ribbon Sample
Date Posted: 07 June 2007 at 5:27am
I've tried for so long
and still can't setup RibbonBar in a simple SDI project
is it possible to provide an simple Ribbon sample that can be understood without reading too many codes??
 
by the way, i am using v 11.1.0
 
thanks



Replies:
Posted By: Oleg
Date Posted: 07 June 2007 at 6:53am
Hi,
 
Attach project you tried. Will point what you forget.


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


Posted By: coldjoke
Date Posted: 07 June 2007 at 11:26pm

somehow it works now @@

but i got another problem.
now i have the RibbonBar but the docking pane has gone
 
 m_paneManager.InstallDockingPanes(this);
 // Set Office 2003 Theme
 m_paneManager.SetTheme(xtpPaneThemeOffice2003);
is it because i am using xtpPaneThemeOffice2003??
 


Posted By: Oleg
Date Posted: 08 June 2007 at 1:14am
Hi,
No, theme can't be problem. Do you create some panes?


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


Posted By: coldjoke
Date Posted: 08 June 2007 at 2:32am

i used the wizard to create the project and it created 2 panes for me

all i did to the project is remove menu and toolbar
and insert Ribbon
 
this is the creation of the panes
 
 // Initialize the docking pane manager and set the
 // initial them for the docking panes.  Do this only after all
 // control bars objects have been created and docked.
 m_paneManager.InstallDockingPanes(this);
 // Set Office 2003 Theme
 m_paneManager.SetTheme(xtpPaneThemeOffice2003);
 // Create docking panes.
 CXTPDockingPane* pwndPane1 = m_paneManager.CreatePane(
  IDR_PANE_OPTIONS, CRect(0, 0,200, 120), xtpPaneDockLeft);
 CXTPDockingPane* pwndPane2 = m_paneManager.CreatePane(
  IDR_PANE_PROPERTIES, CRect(0, 0,200, 120), xtpPaneDockBottom, pwndPane1);
 // Set the icons for the docking pane tabs.
 int nIDIcons[] = {IDR_PANE_OPTIONS, IDR_PANE_PROPERTIES};
  m_paneManager.SetIcons(IDB_BITMAP_ICONS, nIDIcons,
  _countof(nIDIcons), RGB(0, 255, 0));
 // Load the previous state for docking panes.
 CXTPDockingPaneLayout layoutNormal(&m_paneManager);
 if (layoutNormal.Load(_T("NormalLayout")))
 {
  m_paneManager.SetLayout(&layoutNormal);
 }


Posted By: Oleg
Date Posted: 08 June 2007 at 3:42am
Hi,
 
Just tried. Works for me.
 
 
Attach project.


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


Posted By: coldjoke
Date Posted: 08 June 2007 at 3:59am

after adding these two line at the end

 
 m_paneManager.ShowPane(IDR_PANE_OPTIONS);
 m_paneManager.ShowPane(IDR_PANE_PROPERTIES);
it works too, but before using RibbonBar


Posted By: coldjoke
Date Posted: 08 June 2007 at 4:05am
and i don't have the permission to upload files :(


Posted By: Oleg
Date Posted: 08 June 2007 at 6:05am
Hi,
I modified forum settings.


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


Posted By: coldjoke
Date Posted: 08 June 2007 at 11:18pm
Hi,
I know where the problem is now
I closed the docking panes when testing my sample
and by default, the layout was saved on close
that's why they never came out again.
 
thanks for the help :)



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