Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - How to set the off2007 skin to CXTPPropertySheet
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to set the off2007 skin to CXTPPropertySheet

 Post Reply Post Reply
Author
Message
evoX View Drop Down
Senior Member
Senior Member
Avatar

Joined: 25 July 2007
Status: Offline
Points: 207
Post Options Post Options   Thanks (0) Thanks(0)   Quote evoX Quote  Post ReplyReply Direct Link To This Post Topic: How to set the off2007 skin to CXTPPropertySheet
    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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
evoX View Drop Down
Senior Member
Senior Member
Avatar

Joined: 25 July 2007
Status: Offline
Points: 207
Post Options Post Options   Thanks (0) Thanks(0)   Quote evoX Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
evoX View Drop Down
Senior Member
Senior Member
Avatar

Joined: 25 July 2007
Status: Offline
Points: 207
Post Options Post Options   Thanks (0) Thanks(0)   Quote evoX Quote  Post ReplyReply Direct Link To This Post 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>
Back to Top
evoX View Drop Down
Senior Member
Senior Member
Avatar

Joined: 25 July 2007
Status: Offline
Points: 207
Post Options Post Options   Thanks (0) Thanks(0)   Quote evoX Quote  Post ReplyReply Direct Link To This Post Posted: 07 October 2008 at 1:40pm
 
 
This is how my app. looks
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
evoX View Drop Down
Senior Member
Senior Member
Avatar

Joined: 25 July 2007
Status: Offline
Points: 207
Post Options Post Options   Thanks (0) Thanks(0)   Quote evoX Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
evoX View Drop Down
Senior Member
Senior Member
Avatar

Joined: 25 July 2007
Status: Offline
Points: 207
Post Options Post Options   Thanks (0) Thanks(0)   Quote evoX Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 08 October 2008 at 1:36am

Hi,

Replace CXTPPropertySheet to CXTPDialogBase<CXTPPropertySheet> or
CXTPCommandBarsSiteBase<CXTPPropertySheet>.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
evoX View Drop Down
Senior Member
Senior Member
Avatar

Joined: 25 July 2007
Status: Offline
Points: 207
Post Options Post Options   Thanks (0) Thanks(0)   Quote evoX Quote  Post ReplyReply Direct Link To This Post 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>)
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 10 October 2008 at 2:04am
So just replace back to
IMPLEMENT_DYNAMIC(CWSCMainSheet, CXTPPropertySheet)
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
evoX View Drop Down
Senior Member
Senior Member
Avatar

Joined: 25 July 2007
Status: Offline
Points: 207
Post Options Post Options   Thanks (0) Thanks(0)   Quote evoX Quote  Post ReplyReply Direct Link To This Post Posted: 10 October 2008 at 4:10am
Thanks ! it works now :)
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.172 seconds.