![]() |
Ribbonnar support |
Post Reply
|
| Author | |
himanshu
Groupie
Joined: 04 January 2008 Status: Offline Points: 81 |
Post Options
Thanks(0)
Quote Reply
Topic: Ribbonnar supportPosted: 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
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
himanshu
Groupie
Joined: 04 January 2008 Status: Offline Points: 81 |
Post Options
Thanks(0)
Quote Reply
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
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 11 January 2008 at 1:28am |
|
Call
pCommandBars->SetTheme(xtpThemeRibbon);
before you add ribbon.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
himanshu
Groupie
Joined: 04 January 2008 Status: Offline Points: 81 |
Post Options
Thanks(0)
Quote Reply
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
|
|
![]() |
|
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 |