![]() |
How to set the off2007 skin to CXTPPropertySheet |
Post Reply ![]() |
Author | |
evoX ![]() Senior Member ![]() ![]() Joined: 25 July 2007 Status: Offline Points: 207 |
![]() ![]() ![]() ![]() ![]() 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 |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
evoX ![]() Senior Member ![]() ![]() Joined: 25 July 2007 Status: Offline Points: 207 |
![]() ![]() ![]() ![]() ![]() |
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.
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Works for me.
Do you have
#include "SkinFramework\Styles\Office2007\Office2007.rc"
in rc2 ? |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
evoX ![]() Senior Member ![]() ![]() Joined: 25 July 2007 Status: Offline Points: 207 |
![]() ![]() ![]() ![]() ![]() |
this is what I have in .rc2
#include <XTToolkitPro.rc>
#include <Styles\Office2007Blue\Office2007Blue.rc> #include <SkinFramework\Styles\Vista\Vista.rc> |
|
![]() |
|
evoX ![]() Senior Member ![]() ![]() Joined: 25 July 2007 Status: Offline Points: 207 |
![]() ![]() ![]() ![]() ![]() |
![]() This is how my app. looks
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
evoX ![]() Senior Member ![]() ![]() Joined: 25 July 2007 Status: Offline Points: 207 |
![]() ![]() ![]() ![]() ![]() |
thanks ! now it works ! I tought office2007blue.rc is the same as office2007.rc just with a blue color.
|
|
![]() |
|
evoX ![]() Senior Member ![]() ![]() Joined: 25 July 2007 Status: Offline Points: 207 |
![]() ![]() ![]() ![]() ![]() |
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.
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi, Replace CXTPPropertySheet to CXTPDialogBase<CXTPPropertySheet> or
CXTPCommandBarsSiteBase<CXTPPropertySheet>.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
evoX ![]() Senior Member ![]() ![]() Joined: 25 July 2007 Status: Offline Points: 207 |
![]() ![]() ![]() ![]() ![]() |
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>)
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
So just replace back to
IMPLEMENT_DYNAMIC(CWSCMainSheet, CXTPPropertySheet)
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
evoX ![]() Senior Member ![]() ![]() Joined: 25 July 2007 Status: Offline Points: 207 |
![]() ![]() ![]() ![]() ![]() |
Thanks ! it works now :)
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |