![]() |
Ribbon in Dialog app |
Post Reply ![]() |
Author | |
ivox3m ![]() Newbie ![]() ![]() Joined: 13 April 2007 Location: Bulgaria Status: Offline Points: 4 |
![]() ![]() ![]() ![]() ![]() Posted: 13 April 2007 at 8:10am |
Hi,
I'm sorry that this topic has already been discussed, but I'm having a problem when trying to add a ribbon in DialogSample. I've downloaded the eval version 10.4.2 and copied the ribbon adding code from the Ribbon SDI sample to the DialogSample. Everytime I start the sample it crashes in xtpribbonbar.cpp line 375. If I comment out the RepositionControls function calls in OnSize it doesn't crash, but doesn't show the toolbars.
Please help!
|
|
Best Regards
Ivo |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Attach here project to check what you done.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
ivox3m ![]() Newbie ![]() ![]() Joined: 13 April 2007 Location: Bulgaria Status: Offline Points: 4 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Thank you!
I'll attach the project after weekend maybe. If I can I'll attach it sooner
|
|
Best Regards
Ivo |
|
![]() |
|
ivox3m ![]() Newbie ![]() ![]() Joined: 13 April 2007 Location: Bulgaria Status: Offline Points: 4 |
![]() ![]() ![]() ![]() ![]() |
I don't have the project with me now, but I can explain simply what I've done. In the DialogSample I simply added the following two lines in OnInitDialog at the end:
CXTPRibbonBar* pRibbonBar = (CXTPRibbonBar*)pCommandBars->Add("The Ribbon", RUNTIME_CLASS(CXTPRibbonBar));
pRibbonBar->EnableDocking(0);
After that the sample started crashing everytime as I explained it above. Please check it. I use the eval 10.4.2 version.
|
|
Best Regards
Ivo |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
You also need 2 things:
1. in res\DialogSample.rc2 add
#include "Ribbon\Styles\Office2007Blue\Office2007Blue.rc"
2. before create ribbon set ribbon theme:
pCommandBars->SetTheme(xtpThemeRibbon);
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
ivox3m ![]() Newbie ![]() ![]() Joined: 13 April 2007 Location: Bulgaria Status: Offline Points: 4 |
![]() ![]() ![]() ![]() ![]() |
Thank you!
It works great now. |
|
Best Regards
Ivo |
|
![]() |
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 |