Print Page | Close Window

Failed to make sense of CXTPVisualStudio2008Theme!

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=10667
Printed Date: 15 November 2025 at 1:58am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Failed to make sense of CXTPVisualStudio2008Theme!
Posted By: calvi
Subject: Failed to make sense of CXTPVisualStudio2008Theme!
Date 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!




Replies:
Posted By: Oleg
Date Posted: 19 May 2008 at 1:18am
Hi,
Check our GUI_VisualStudio sample


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


Posted By: calvi
Date 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?



Posted By: Oleg
Date 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



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