![]() |
Failed to make sense of CXTPVisualStudio2008Theme! |
Post Reply
|
| Author | |
calvi
Groupie
Joined: 20 March 2004 Location: United Kingdom Status: Offline Points: 43 |
Post Options
Thanks(0)
Quote Reply
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! |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 19 May 2008 at 1:18am |
|
Hi,
Check our GUI_VisualStudio sample
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
calvi
Groupie
Joined: 20 March 2004 Location: United Kingdom Status: Offline Points: 43 |
Post Options
Thanks(0)
Quote Reply
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? |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
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 |