Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CXTPTabControl and Office 2007 NormalAqua colors
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPTabControl and Office 2007 NormalAqua colors

 Post Reply Post Reply
Author
Message
MacW View Drop Down
Senior Member
Senior Member


Joined: 26 June 2007
Status: Offline
Points: 253
Post Options Post Options   Thanks (0) Thanks(0)   Quote MacW Quote  Post ReplyReply Direct Link To This Post Topic: CXTPTabControl and Office 2007 NormalAqua colors
    Posted: 30 March 2008 at 1:58pm
Hi,

When I use xtpTabAppearancePropertyPage2007 to set the appearance of a CXTPTabControl the colors are apparently always as in the NormalBlue color set of the Office 2007 skin.

How I can I set the tab control to use the NormalAqua color set?
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: 31 March 2008 at 1:00am
Hi,
You need include Styles\Office2007Aqua\Office2007Aqua.rc  resource instead of Blue.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
MacW View Drop Down
Senior Member
Senior Member


Joined: 26 June 2007
Status: Offline
Points: 253
Post Options Post Options   Thanks (0) Thanks(0)   Quote MacW Quote  Post ReplyReply Direct Link To This Post Posted: 31 March 2008 at 10:50am
Hi, Oleg

I'm at  a loss here. Is there any documentation somewhere about how you want to us to use this?

There are skins, and themes, and your sample projects you call a wild mix of functions like SetImageHandle(hModule, _T("OFFICE2007SILVER.INI")) or SetDockingPaneTheme(xtpPaneThemeOffice2007) or GetToolTipContext()->SetStyle(xtpToolTipOffice2007) or m_wndScrollBar[SB_HORZ].SetScrollBarStyle(xtpScrollStyleOffice2007Dark)

All this seems a bit complex to me. When to use what and in which order?
Do I need to call something to make my control bars take on the Office skin? The toolbars? The scroll bars? Docking Panels? Dialog Boxes?

I attempted to use

XTPSkinManager()->LoadSkin(...Office2007.cjstyles)

in my application to use the Office2007 look if the user wants to, but apparently this does not switch all of the XTP controls into Office2007 mode? The dialog boxes look OK, and the buttons also take the Aqua look when I use the ...Aqua.INI file with the LoadSkin.  But tab controls don't use the skin, and toolbars also look strange.

If LoadSkin does not work for all controls, I can include the .RC file as you outline in your reply. But which functions do I have to call to make this work, and even switchable between Aqua and Silver and Blue and Black?

I've checked the XTP User Guide which does not mention any of this, and I've also checked the Reference Guide, which only has the usual one-liners like "LoadSkin -> Loads a Skin".

There is no documentaton about which theme or skin functions to use to make it work, and the samples are no help here either.
There are so many "Office2007"-related method calls in the samples, and not further documentation about why you use that function, and what it does, and how it relates to other functions..

Can you please name the method calls I need to use to make the Office2007 skin or theme work with all controls? And with the different color sets you provide?




Back to Top
Smucker View Drop Down
Senior Member
Senior Member
Avatar

Joined: 02 February 2008
Status: Offline
Points: 156
Post Options Post Options   Thanks (0) Thanks(0)   Quote Smucker Quote  Post ReplyReply Direct Link To This Post Posted: 31 March 2008 at 11:27am
I agree that it's confusing. The CXTP Themes and Styles apply directly to things painted directly by CodeJock, while Skins apply to everything.

For skins, you can use any .msstyles files as well as the .cjstyles provided by Codejock.

To apply a consistent skin to everything, set the themes/styles to defaults.

The thing that probably bugs me the most is that there are different themes/styles for different CJ items, rather than a consistent set used by everything. I'm narrowing things down to just a few choices for my users unless they choose to use a custom skin.

Product: Xtreme Toolkit Pro version 13.2 (Unicode, static build)

Platform: Windows 200x/XP/Vista/Win7 (32/64 bit)

Language: Visual C++ 9.0 (Studio 2008)

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: 01 April 2008 at 1:34am
Hi,
 
PropertyPage2007 doesn't use SkinFramework - it uses Office2007 bitmaps that you include to your resource file.
 
See res\app.rc2 file in these samples.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
MacW View Drop Down
Senior Member
Senior Member


Joined: 26 June 2007
Status: Offline
Points: 253
Post Options Post Options   Thanks (0) Thanks(0)   Quote MacW Quote  Post ReplyReply Direct Link To This Post Posted: 01 April 2008 at 5:21am
I'm not talking about a property page here, Oleg.

I want to make your skinning / theme technology work in my application for
all controls. As I explained in my initial post, the skin I have set for the application is not used for the CXTPTabControl, for example.

I hence asked for advice how to make this work. Since your help files are no help, and your samples use so many skin/theme related functions without any further comment on how to use these functions, I stuck for days now.

When I use for example


XTPSkinManager()->LoadSkin(folder+"Office2007.cjstyles",T("NormalAqua.ini")));

some parts of my dialog-based test application get the aqua look, e.g. dialog boxes, buttons and the like. But not the CXTPTabControl.

Even when I load the "Styles\Office2007Aqua\Office2007Aqua.rc" resources, the tab control looks different than the rest of the application. See screen shot 1 below:




Since I'm not really interested in Aqua, I tried to use the "black" skin/theme. But I failed again. I can include the "black" resources so the XTPTabCtrl takes a black look, but how to I enable the black Office2007 skin for the test of my application (e.g. what is the .INI name to use with LoadSkin for the black Office2007 theme, or is there none??

All I can get so far is:





This is LoadSkin Office2007 with "NormalBlack.ini" and inclusion of "Styles\Office2007Black\Office2007Black.rc" in the resource file. The application is not skinned at all as it appears, but at least the tab control looks "black".

I can get it to work only by using the default "blue" skin. I don't want this skin, but at least it works:




This is the result I get by loading LoadSkin with "Office2007.cjstyles" without any additional parameter (.ini file), and also including the "Office2007Blue.rc" resources to color the tab control.

So my code seems to work in principle, at least most of it.


Again, my question:

How to I "skin" my application to get the black or aqua Office2007 look everywhere?  Please answer as detailed as possible, because I've lost several days over this already and I'm not that smart. I need to get this simple stuff working so I can go on.


Back to Top
MacW View Drop Down
Senior Member
Senior Member


Joined: 26 June 2007
Status: Offline
Points: 253
Post Options Post Options   Thanks (0) Thanks(0)   Quote MacW Quote  Post ReplyReply Direct Link To This Post Posted: 05 April 2008 at 8:50am
Any comment on this? I'm still looking for a solution that makes XTP theming work...
Back to Top
adrien View Drop Down
Senior Member
Senior Member


Joined: 30 April 2007
Location: New Zealand
Status: Offline
Points: 449
Post Options Post Options   Thanks (0) Thanks(0)   Quote adrien Quote  Post ReplyReply Direct Link To This Post Posted: 05 April 2008 at 1:12pm
Hi
 
It took me a while to get my head around this as well.  the differnence between themes and skins is initially confusing, but as Smucker said, there are basically 2 technologies due to the way the system paints things.
 
Things like dialog controls, window frames, tab controls, list controls, tree controls  etc are normally painted by the OS.  To change the way the OS paints these, the CJ skin framework inserts a windows hook to handle painting itself of OS-created objects.  This is a skin.
 
For things that are custom controls of CJ, these are already just painted by the CJ code, so there's no skinning.  The exception to this seems to be if you use Office2007 frames on your main window.  In this case, there are separate resources you need to include in your app, and the framework inserts a hook only for frame window creation.
 
 
there is no skin for Office2007 for anything other than blue and aqua.
Back to Top
MacW View Drop Down
Senior Member
Senior Member


Joined: 26 June 2007
Status: Offline
Points: 253
Post Options Post Options   Thanks (0) Thanks(0)   Quote MacW Quote  Post ReplyReply Direct Link To This Post Posted: 08 April 2008 at 9:27am
Hi, Adrian

thank you very much  for your support and guidance.

So, there is no black office skin. Hence my attempts are futile.

And there is no common concept pr mechanism in XTP which allows me to control the look of the various XTP classes, frame windows, toolbars etc. in a global way.

And there is also no documentation of how all this is meant to be used, how the classes relate, which paint managers or paint manager functions are meant to be used with which class.  I suppose we are meant to find out how this works by trial and error then...

Yes, I know there are samples. But they often just throw functions and methods around without explaining anything.  You open a sample, they call 20 methods, initiate different themes and paint managers, and then achieve the look they want. But when you try to make it work for your application or change something, you're at a loss. Suddenly it falls apart, and there is no documentation which explains what each of these method do. Which would in turn allow us to find out what to use, and when.
This is sometimes very frustrating when you're facing a deadline...

@Codejock

Anyway, if the way I do it works with the default blue Office 2007 skin and the Office2007 paint manager, it should work with Aqua too. But when switching to Aqua (skins, themes, resources), the different UI elements look different (see my screen shot). Any idea?


Back to Top
adrien View Drop Down
Senior Member
Senior Member


Joined: 30 April 2007
Location: New Zealand
Status: Offline
Points: 449
Post Options Post Options   Thanks (0) Thanks(0)   Quote adrien Quote  Post ReplyReply Direct Link To This Post Posted: 10 April 2008 at 3:13am
you're welcome
 
missing those screenshots though.
 
There is a lot of trial and error I've found, esp for things like the task panel, you've not only got themes to test out, but also behaviours.
 
I've found responsiveness to be very good here on the forums if you have any issue, but still that is very resource-consuming for CodeJock.  I'd rather Oleg was writing code than answering zillions of FAQs
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.157 seconds.