Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Adding 2007 themes
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Adding 2007 themes

 Post Reply Post Reply
Author
Message
garylyb View Drop Down
Newbie
Newbie


Joined: 23 August 2006
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote garylyb Quote  Post ReplyReply Direct Link To This Post Topic: Adding 2007 themes
    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
 

 

Back to Top
garylyb View Drop Down
Newbie
Newbie


Joined: 23 August 2006
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote garylyb Quote  Post ReplyReply Direct Link To This Post Posted: 04 September 2006 at 11:27am
 
OK, I found it, had to copy the styles directory over to my debug directory
 
Gary
 
Back to Top
Warren View Drop Down
Groupie
Groupie
Avatar

Joined: 23 February 2005
Status: Offline
Points: 64
Post Options Post Options   Thanks (0) Thanks(0)   Quote Warren Quote  Post ReplyReply Direct Link To This Post 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...
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.