Print Page | Close Window

Ribbon and skin

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=8409
Printed Date: 13 November 2025 at 9:10pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Ribbon and skin
Posted By: joffreyb
Subject: Ribbon and skin
Date 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



Replies:
Posted By: ABuenger
Date 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


Posted By: joffreyb
Date 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


Posted By: joffreyb
Date 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



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