Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Failed to make sense of CXTPVisualStudio2008Theme!
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Failed to make sense of CXTPVisualStudio2008Theme!

 Post Reply Post Reply
Author
Message
calvi View Drop Down
Groupie
Groupie


Joined: 20 March 2004
Location: United Kingdom
Status: Offline
Points: 43
Post Options Post Options   Thanks (0) Thanks(0)   Quote calvi Quote  Post ReplyReply Direct Link To This Post Topic: Failed to make sense of CXTPVisualStudio2008Theme!
    Posted: 18 May 2008 at 1:06pm

I wanted to find out how to use the Visual Studio 2008 custom theme, so I started with the Users' Guide, drew a blank, so opened the Online Help.  Nothing in the contents or the index, so I searched for "theme" and got 500 hits, which was unmanageable, so then tried "custom theme", with an equally unmanageable 183 hits.

Next, I grepped the samples tree and found a likely candidate in Samples\CommandBars\CustomThemes, and discovered that I needed to make the following call:

CXTPPaintManager::SetCustomTheme(new CXTPVisualStudio2008Theme());

So far so good, but the appearance of the resulting status bar is nothing like in VS 2008.  The sample does not use tabbed docking panes, but when I create some using CXTPDockingPaneManager, they also look nothing like VS 2008.  Where could I find out how to apply the same custom theme to status bars and the pane manager?  There are 74 samples, so I tried to narrow down the search by grepping SetCustomTheme, which occurs in 14 of them.  DockingContainers looks a possibility, but it's making the following call:

XTPPaintManager()->SetCustomTheme(new CComandBarsPaintManager());

No indication is given of why it's doing it differently from the CustomThemes sample.  However, I spotted this line:

m_paneManager.SetCustomTheme(new CDockingPanePaintManager());

but it turns out that that uses a different class of theme, which hasn't got a subclass for VS 2008.

At this point, I was totally confused about themes.  The complete lack of documentation and helpful comments in the sample files meant that I would have to plough through hundreds of lines of source code to find out how they worked, and I don't have the time.

Please, please, please CodeJock, write some proper documentation, and save your time having to explain the same things over and over again, and your customers time having to make sense out of undocumented source code.  It's such a waste!

Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 19 May 2008 at 1:18am
Hi,
Check our GUI_VisualStudio sample
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
calvi View Drop Down
Groupie
Groupie


Joined: 20 March 2004
Location: United Kingdom
Status: Offline
Points: 43
Post Options Post Options   Thanks (0) Thanks(0)   Quote calvi Quote  Post ReplyReply Direct Link To This Post Posted: 19 May 2008 at 9:41am

Thanks Oleg, but an overview of how themes and custom themes actually work would be much more useful.  The samples give no insight as to how the classes interact with each other and no explanation as to which components are affected by XTPPaintManager::SetTheme and which have independent SetTheme methods, or why they have them.

As it is, when xtpThemeVisualStudio2008 is used in the GUI_VisualStudio sample, the statusbar appearance is completely wrong, and the document tabs are not completely right.  For example, the active tab is enlarged in the real Visual Studio. 

CXTPStatusBar doesn't have a documented SetTheme member, so how is one supposed to choose its theme?

Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 20 May 2008 at 12:50am
Hi,
 
Add line
XTPPaintManager()->m_bThemedStatusBar = TRUE;
to have WInXP themed statusbar.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.079 seconds.