Themes on W2K... |
Post Reply |
Author | |
ddlittle
Senior Member Joined: 19 February 2004 Location: United States Status: Offline Points: 132 |
Post Options
Thanks(0)
Posted: 29 April 2004 at 3:49pm |
I was testing an app on a W2K box that uses the Office/2003 theme, and the colors are all dull. What do most of you do in this situation? Do you switch to a Office/2000 theme on W2K? Do you try to emulate themes by hardcoding the colors in the paint manager? I really don't want to ship something that is that dull... Thanks! - David Little |
|
Ark42
Senior Member Joined: 20 October 2003 Status: Offline Points: 291 |
Post Options
Thanks(0)
|
See https://forum.codejock.com/forum_posts.asp?TID=626&P N=2 -- I use hard coded colors to simulate the blue theme that it would look like under XP for anything less then XP, but only if the user has the default grey settings for their OS. Edited by Ark42 |
|
ddlittle
Senior Member Joined: 19 February 2004 Location: United States Status: Offline Points: 132 |
Post Options
Thanks(0)
|
That looks pretty good,except for the pane colors. I guess I need to do something similar for those colors. I'll try it tomorrow... - David Little |
|
Ark42
Senior Member Joined: 20 October 2003 Status: Offline Points: 291 |
Post Options
Thanks(0)
|
Not sure what you mean by pane colors? The colors are all the exact same as they would look with the normal Office2003 theme under XP. Got a screenshot? |
|
ddlittle
Senior Member Joined: 19 February 2004 Location: United States Status: Offline Points: 132 |
Post Options
Thanks(0)
|
For my docking panes, I have this: GetDockingPaneManager()->SetTheme(xtpPaneThemeOffic e2003); which is a different method than the overridden theme. The color arrays and theme members are the same. Am I using this wrong? - David |
|
Ark42
Senior Member Joined: 20 October 2003 Status: Offline Points: 291 |
Post Options
Thanks(0)
|
Yeah, you aren't using the custom theme then. Anyplace you use SetTheme
you need to use SetCustomTheme or some other equivalent. You need
to have a "new CXTPOffice2003ThemeEx()" for each place, I think.
I have to use the custom thing twice, and each one needs its own new'd copy or it blows up later on when they try to self-delete or something: CXTPPaintManager::SetCustomTheme(new CXTPOffice2003ThemeEx()); GetCommandBars()->SetPaintManager(new CXTPOffice2003ThemeEx()); |
|
Ark42
Senior Member Joined: 20 October 2003 Status: Offline Points: 291 |
Post Options
Thanks(0)
|
Ok, well I hadn't used the docking pain until now, but I think it needs its own theme, because its derived from some other class: class CXTPDockingPaneOffice2003ThemeEx : public CXTPDockingPaneOffice2003Theme { public: CXTPDockingPaneOffice2003ThemeEx(BOOL bGreyToBlue = TRUE, BOOL bYellowHighlight = FALSE); BOOL m_bGreyToBlue, m_bYellowHighlight; protected: virtual void RefreshMetrics(); }; CXTPDockingPaneOffice2003ThemeEx::CXTPDockingPaneOffice2 003ThemeEx(BOOL bGreyToBlue, BOOL bYellowHighlight) { m_bGreyToBlue = bGreyToBlue; m_bYellowHighlight = bYellowHighlight; RefreshMetrics(); } void CXTPDockingPaneOffice2003ThemeEx::RefreshMetrics() { CXTPDockingPaneOffice2003Theme::RefreshMetrics(); if( !m_bLunaTheme ) { CXTPColorManager *pClrMgr = XTPColorManager(); COLORREF btn = pClrMgr->GetColor(COLOR_BTNFACE); if( m_bGreyToBlue && (btn == RGB(192, 192, 192) || btn == RGB(212, 208, 200)) ) { m_clrCommandBarDark = RGB(129, 169, 226); m_clrCommandBarLight = RGB(221, 236, 254); m_bLunaTheme = TRUE; m_arrColor[0] = RGB(0, 0, 0); m_arrColor[1] = RGB(0, 78, 152); m_arrColor[2] = RGB(0, 84, 227); m_arrColor[3] = RGB(122, 150, 223); m_arrColor[4] = RGB(255, 255, 255); m_arrColor[5] = RGB(255, 255, 255); m_arrColor[6] = RGB(0, 0, 0); m_arrColor[7] = RGB(0, 0, 0); m_arrColor[8] = RGB(0, 0, 0); m_arrColor[9] = RGB(255, 255, 255); m_arrColor[10] = RGB(212, 208, 200); m_arrColor[11] = RGB(212, 208, 200); m_arrColor[12] = RGB(128, 128, 128); m_arrColor[13] = RGB(49, 106, 197); m_arrColor[14] = RGB(255, 255, 255); m_arrColor[15] = RGB(236, 233, 216); m_arrColor[16] = RGB(172, 168, 153); m_arrColor[17] = RGB(172, 168, 153); m_arrColor[18] = RGB(0, 0, 0); m_arrColor[19] = RGB(216, 228, 248); m_arrColor[20] = RGB(255, 255, 255); m_arrColor[21] = RGB(113, 111, 100); m_arrColor[22] = RGB(251, 248, 231); m_arrColor[23] = RGB(0, 0, 0); m_arrColor[24] = RGB(255, 255, 225); m_arrColor[25] = RGB(181, 181, 181); m_arrColor[26] = RGB(0, 0, 128); m_arrColor[27] = RGB(61, 149, 255); m_arrColor[28] = RGB(0, 0, 0); m_arrColor[29] = RGB(0, 0, 0); m_arrColor[30] = RGB(158, 190, 245); m_arrColor[31] = RGB(255, 238, 194); m_arrColor[32] = RGB(0, 0, 128); m_arrColor[33] = RGB(254, 128, 62); m_arrColor[34] = RGB(144, 157, 178); m_arrColor[35] = RGB(197, 194, 184); m_arrColor[36] = RGB(255, 192, 111); m_arrColor[37] = RGB(0, 0, 128); m_arrColor[38] = RGB(39, 65, 118); m_arrColor[39] = RGB(106, 140, 203); m_arrColor[40] = RGB(109, 150, 208); m_arrColor[41] = RGB(246, 246, 246); m_arrColor[42] = RGB(230, 227, 210); m_arrColor[43] = RGB(0, 45, 150); m_arrColor[44] = RGB(0, 0, 0); m_arrColor[45] = RGB(0, 0, 0); m_arrColor[46] = RGB(0, 0, 0); m_arrColor[47] = RGB(0, 0, 0); m_arrColor[48] = RGB(218, 233, 255); m_arrColor[49] = RGB(129, 126, 114); m_arrColor[50] = RGB(0, 0, 128); m_arrColor[51] = RGB(216, 231, 252); m_arrColor[52] = RGB(158, 190, 245); m_arrColor[53] = RGB(203, 225, 252); m_arrColor[54] = RGB(0, 45, 150); m_arrColor[55] = RGB(196, 218, 250); } else if(m_bYellowHighlight) { m_arrColor[31] = RGB(255, 238, 194); m_arrColor[33] = RGB(254, 128, 62); m_arrColor[36] = RGB(255, 192, 111); m_bLunaTheme = TRUE; } } } m_paneManager.SetCustomTheme(new CXTPDockingPaneOffice2003ThemeEx()); Its almost the same class, but it works like that. What I havn't figured out yet is how to get the status bar color the proper shade of grey (by this I mean it is drawing as RGB(212, 208, 200) despite me wanting it RGB(236, 233, 216)): ..and how to get the edit box portion of a combo box on my toolbars to also use the proper shade of grey when disabled, and also its rightclick menu it not themed... |
|
Ark42
Senior Member Joined: 20 October 2003 Status: Offline Points: 291 |
Post Options
Thanks(0)
|
Well the best fix I could come up with without ripping apart all the codejock source is to just set m_arrColor[15] = btn; instead of m_arrColor[15] = RGB(236, 233, 216); This will make the theme not look exactly the same as it would under XP, but you still get all the cool blue gradiants and yellow/orange highlights, without the dual-tone disabled combo box and stuff. It will just use the normal button face color 212,208,200 or 192,192,192. |
|
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 |