Print Page | Close Window

Ribbon in Dialog app

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=6859
Printed Date: 03 March 2025 at 5:23pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Ribbon in Dialog app
Posted By: ivox3m
Subject: Ribbon in Dialog app
Date 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



Replies:
Posted By: Oleg
Date Posted: 13 April 2007 at 9:37am
Hi,
 
Attach here project to check what you done.


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


Posted By: ivox3m
Date Posted: 13 April 2007 at 2:51pm
Hi,
 
Thank you!
I'll attach the project after weekend maybe. If I can I'll attach it sooner


-------------
Best Regards
Ivo


Posted By: ivox3m
Date Posted: 13 April 2007 at 8:33pm
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


Posted By: Oleg
Date Posted: 14 April 2007 at 1:27am
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


Posted By: ivox3m
Date Posted: 15 April 2007 at 5:24am
Thank you!
It works great now.


-------------
Best Regards
Ivo



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