Print Page | Close Window

Problem with xtpThemeRibbon

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


Topic: Problem with xtpThemeRibbon
Posted By: phil_the_lick
Subject: Problem with xtpThemeRibbon
Date Posted: 03 January 2008 at 3:55am
Hello,

Currently using the eval version of toolkit pro on VS2008 pro. My app can apply visual styles to all the components no problem except the ribbon style. It is causing a crash.

Code to apply style:

XTPPaintManager()->SetTheme(xtpThemeRibbon);
EnableOffice2007Frame(GetCommandBars());

I've followed the ShortcutBar and panes samples that use this style as best as I can, so far as I can see everything is the same. My main frame is derived from CXTPOffice2007FrameHook.

I've also tried activating this style both on window creation and on a command after everything is set up. Same result.

The call stack on the break looks like this:

mfc90ud.dll!_AfxModifyStyle(HWND_*hWnd=0x00080810, int nStyleOffset=-16, unsigned long dwRemove=12582912, unsigned long dwAdd=8388608, unsigned int nFlags=32) Line 99 (this is in wincore.cpp)
mfc90ud.dll!CWnd::ModifyStyle(HWND_*hWnd=0x00080810, unsigned long dwRemove=12582912, unsigned long dwAdd==8388608, unsigned nFlags=32) Line 111 (also wincore.cpp)
ToolkitProEval1122vc90UD.dll!00a47237()
Then the line in my code that calls EnableOffice2007Frame()

Any ideas?

Cheers,
Phil.




Replies:
Posted By: Oleg
Date Posted: 03 January 2008 at 6:45am

Hi,

have you added ribbon bitmaps to resources ?
Add

#include "Styles\Office2007Blue\Office2007Blue.rc"


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


Posted By: phil_the_lick
Date Posted: 03 January 2008 at 8:34am
Yes, in the rc2 file.

I have also performed a side-by-side exe resource comparison in VS with my exe and the Shortcutbar sample. All the resources are there.

Phil.





Posted By: Oleg
Date Posted: 03 January 2008 at 11:14am
Hi,
Need to debug to give solution :( Try to reproduce with new project geneated with wizard.


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



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