Print Page | Close Window

How to set the off2007 skin to CXTPPropertySheet

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=12342
Printed Date: 16 September 2024 at 4:22pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to set the off2007 skin to CXTPPropertySheet
Posted By: evoX
Subject: How to set the off2007 skin to CXTPPropertySheet
Date Posted: 06 October 2008 at 6:23am
How can I set the office 2007 theme to a CXTPPropertySheet and to it's pages?
 
 
I have included these lines in the constructor of each page and of the propertysheet, but without success. I have a static project with the office 2007 theme resource included.
 

XTPSkinManager()->SetApplyOptions(XTPSkinManager()->GetApplyOptions() | xtpSkinApplyMetrics);

BOOL bRes=XTPSkinManager()->LoadSkin(NULL, _T("NORMALBLUE.INI"));

 
bRes returns 0



Replies:
Posted By: Oleg
Date Posted: 06 October 2008 at 9:11am

Hi,

Add also line
XTPSkinManager()->GetResourceFile()->SetModuleHandle(AfxGetInstanceHandle());
and call LoadSkin only in constructo of Sheet or better in InitInstance of your app.


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


Posted By: evoX
Date Posted: 06 October 2008 at 11:00pm
I added the line in initinstance then in the constructor of the sheet, but the propertysheet buttons and propertypages still does not have the office2007 skin :(
 
I have a taskpanel navigator for the propertysheet and that is shown with the office 2007 theme, so the resources are included correctly.


Posted By: Oleg
Date Posted: 07 October 2008 at 2:11am
Works for me.
 
Do you have
#include "SkinFramework\Styles\Office2007\Office2007.rc"
in rc2 ?


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


Posted By: evoX
Date Posted: 07 October 2008 at 1:03pm
this is what I have in .rc2
 
#include <XTToolkitPro.rc>
#include <Styles\Office2007Blue\Office2007Blue.rc>
#include <SkinFramework\Styles\Vista\Vista.rc>


Posted By: evoX
Date Posted: 07 October 2008 at 1:40pm
 
 
This is how my app. looks


Posted By: Oleg
Date Posted: 07 October 2008 at 2:31pm
you have Vista skin - not Office2007.
 
replace
#include <SkinFramework\Styles\Vista\Vista.rc>
to
#include <SkinFramework\Styles\Office2007\Office2007.rc>


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


Posted By: evoX
Date Posted: 07 October 2008 at 11:35pm

thanks ! now it works !

I tought office2007blue.rc is the same as office2007.rc just with a blue color.


Posted By: evoX
Date Posted: 08 October 2008 at 1:02am
I have another problem, I want to add a toolbar to the propertysheet
and when I call InitCommandBars in the InitDialog of the propertysheet the application won't compile
error C3861: 'InitCommandBars': identifier not found
 
If I place it in any other dialog from the application it compiles without problems.
and XTTolkitPro.h is included
 
The only thing I don't have before InitCommandBars is a statusbar, because I don't need one.


Posted By: Oleg
Date Posted: 08 October 2008 at 1:36am

Hi,

Replace CXTPPropertySheet to CXTPDialogBase<CXTPPropertySheet> or
CXTPCommandBarsSiteBase<CXTPPropertySheet>.


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


Posted By: evoX
Date Posted: 09 October 2008 at 1:27pm
now I get this error when I try to compile it
 

error C2039: 'classCXTPCommandBarsSiteBase' : is not a member of 'CXTPCommandBarsSiteBase<TBase>'

with

[

 TBase=CXTPPropertySheet

 ]

 error C2065: 'classCXTPCommandBarsSiteBase' : undeclared identifier

 
the error occurs in this line:
IMPLEMENT_DYNAMIC(CWSCMainSheet, CXTPCommandBarsSiteBase<CXTPPropertySheet>)


Posted By: Oleg
Date Posted: 10 October 2008 at 2:04am
So just replace back to
IMPLEMENT_DYNAMIC(CWSCMainSheet, CXTPPropertySheet)


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


Posted By: evoX
Date Posted: 10 October 2008 at 4:10am
Thanks ! it works now :)



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