Print Page | Close Window

Adding 2007 themes

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=4963
Printed Date: 11 November 2025 at 8:14pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Adding 2007 themes
Posted By: garylyb
Subject: Adding 2007 themes
Date Posted: 04 September 2006 at 11:20am
Hello -
 
I'm trying to add 2007 themes to my application, I added the code from the StylerBrowser sample that switches between themes, and changed my frame declaration to:
 

class CMainFrame : public CXTPMDIFrameWnd, CXTPOffice2007FrameHook

Now, when I call

EnableOffice2007Frame(theme == xtpThemeRibbon || theme == xtpThemeOffice2007 ? GetCommandBars() : 0);
 
with either

xtpPaneThemeOffice2007 or  xtpPaneThemeOffice2007

I get a fault here:
 

CSize CXTPOffice2007Image::GetExtent() const

{

if (!m_hBitmap) return CSize(0, 0);

...}
 
 
as m_hBitmap is never initialized.
 
I must be missing something, but I haven't been able to find it yet.
 
 
Thanks
 
Gary
 

 




Replies:
Posted By: garylyb
Date Posted: 04 September 2006 at 11:27am
 
OK, I found it, had to copy the styles directory over to my debug directory
 
Gary
 


Posted By: Warren
Date Posted: 24 November 2006 at 12:26pm
I ran into this issue too, when I was trying to add the 2007 look to my app. What eventually solved it for me was to go to open the .rc2 file in my project, and inserting the line:

#include "Ribbon\Styles\Office2007Blue\Office2007Blue.rc"

as the last line in the file (and rebuilding, of course).

(Note: you also seem to have to derive your CMainFrame class from CXTPOffice2007FrameHook as well)

Hopefully this helps someone...



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