Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Ribbon and skin
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Ribbon and skin

 Post Reply Post Reply
Author
Message
joffreyb View Drop Down
Newbie
Newbie
Avatar

Joined: 10 October 2007
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote joffreyb Quote  Post ReplyReply Direct Link To This Post Topic: Ribbon and skin
    Posted: 11 October 2007 at 1:05pm

Hello,

Am I right to assume that a ribbon cannot coexist with the skinning offered by XTPSkinManager() (in static mode anyway) ?

If I try to add the two required files (style & skinframework) to my RC2, it wont find the Office2007 images. If I only include "Styles\Office2007Aqua\Office2007Aqua.rc", all windows created after are shown with missing parts.
 
I noted that none of the samples show a ribbon based app that pops skinned windows. i.e. the ribbon sample that calls the OPEN FILE dialog pops it in its regular XP layout.
 
Is there a way to succesfully combine the two includes to be able to statically use a skin AND a ribbon ? 
 
Thanks
Joff.
Xtreme Toolkit Pro v13.4.0
Win7-64, i7-920
VS8, VS9, VS10
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 11 October 2007 at 1:51pm
I use the Ribbon and the SkinFramework in my app, and everything is linked statically in the release.

You also need to add #include "XTToolkitPro.rc" to your .rc2 file if you link the toolkit statically.

Codejock support
Back to Top
joffreyb View Drop Down
Newbie
Newbie
Avatar

Joined: 10 October 2007
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote joffreyb Quote  Post ReplyReply Direct Link To This Post Posted: 11 October 2007 at 1:59pm
I did as show bellow;
 

#include <XTToolkitPro.rc>

//#include "SkinFramework\Styles\vista\vista.rc"

#include "Styles\Office2007Aqua\Office2007Aqua.rc"

Also have this in my StdAfx.h

#define _XTP_STATICLINK

#include <XTToolkitPro.h> // Codejock Software Components

 
As soon as I use a SkinFramework, the ribbon fails because the theme manager cannot find the resources.
 
This test: 

CString csTmp = XTPOffice2007Images()->GetImageString("images", "ToolbarButtons50");

returns a valid string only if I skip SkinFramework
 
This is how I tried to skin:

XTPSkinManager()->GetResourceFile()->SetModuleHandle(AfxGetInstanceHandle());

XTPSkinManager()->SetApplyOptions(xtpSkinApplyMetrics | xtpSkinApplyFrame | xtpSkinApplyColors);

XTPSkinManager()->LoadSkin(NULL, _T("NORMALBLUE_INI"));

Joff.
Xtreme Toolkit Pro v13.4.0
Win7-64, i7-920
VS8, VS9, VS10
Back to Top
joffreyb View Drop Down
Newbie
Newbie
Avatar

Joined: 10 October 2007
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote joffreyb Quote  Post ReplyReply Direct Link To This Post Posted: 12 October 2007 at 2:34pm
Problem fixed.
 
I have noted that (for me anyway) I can only use the BLUE theme for the ribbon combined with the Vista skin. If I include the Aqua theme for example coupled with Vista skin, it fails.
 
I have to add this in my code for all styles to work with skins:

XTPOffice2007Images()->SetHandle(AfxGetApp()->m_hInstance, CString("OFFICE2007AQUA_INI"));  //or other appropriate INI

 
Joff.
Xtreme Toolkit Pro v13.4.0
Win7-64, i7-920
VS8, VS9, VS10
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.031 seconds.