Print Page | Close Window

Ribbonnar support

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=9273
Printed Date: 01 March 2025 at 1:43pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Ribbonnar support
Posted By: himanshu
Subject: Ribbonnar support
Date Posted: 10 January 2008 at 6:43am
Hi
 
I want ribbonbar support in my application
I have added following lines of code from Ribbonbar Sample
 
CXTPRibbonBar* pRibbonBar = (CXTPRibbonBar*)pCommandBars->Add(_T("The Ribbon"), xtpBarTop, RUNTIME_CLASS(CXTPRibbonBar));
if (!pRibbonBar)
{return FALSE;}
pRibbonBar->EnableDocking(0);
 
When i try to add a tab into it it throws an exception
at this line
CXTPRibbonTab* pTabHome = pRibbonBar->AddTab(Id);
 
Could u suggest any solution
 
Thanks in advance



Replies:
Posted By: Oleg
Date Posted: 10 January 2008 at 11:14am
Think you didn't add ribbon resources.
Add
#include "Styles\Office2007Blue\Office2007Blue.rc"
in res\xxx.rc2 file.

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


Posted By: himanshu
Date Posted: 11 January 2008 at 12:45am
hi
 
after adding the below line in rc2 i am facing the same crash at the same line
 
 
 


Posted By: Oleg
Date Posted: 11 January 2008 at 1:28am
Call
 
pCommandBars->SetTheme(xtpThemeRibbon);
before you add ribbon.


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


Posted By: himanshu
Date Posted: 11 January 2008 at 5:40am
is there any difference in setting themes by
CXTPPaintManager::SetTheme(xtpThemeRibbon); and
pCommandBars->SetTheme(xtpThemeRibbon);

as the second one is working perfectly all right for  me

himanshu



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