<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Switching Themes on a CXTPTabClientWnd</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Switching Themes on a CXTPTabClientWnd]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 04 Apr 2026 01:39:16 +0000</pubDate>
  <lastBuildDate>Sun, 02 Dec 2007 23:25:01 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=8452</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Switching Themes on a CXTPTabClientWnd : Hi, Try this:  m_pPaneManag...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8452&amp;PID=29110&amp;title=switching-themes-on-a-cxtptabclientwnd#29110</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1897">shineryu</a><br /><strong>Subject:</strong> 8452<br /><strong>Posted:</strong> 02 December 2007 at 11:25pm<br /><br /><DIV>Hi,</DIV><DIV>Try this:</DIV><DIV>&nbsp;</DIV><DIV>m_pPaneManager-&gt;GetPaintManager()-&gt;RefreshMetrics();</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Sun, 02 Dec 2007 23:25:01 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8452&amp;PID=29110&amp;title=switching-themes-on-a-cxtptabclientwnd#29110</guid>
  </item> 
  <item>
   <title><![CDATA[Switching Themes on a CXTPTabClientWnd : Yay, that did it!  It turns out...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8452&amp;PID=27461&amp;title=switching-themes-on-a-cxtptabclientwnd#27461</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3350">Jayonas</a><br /><strong>Subject:</strong> 8452<br /><strong>Posted:</strong> 19 October 2007 at 10:32am<br /><br />Yay, that did it!  It turns out that calling Refresh isn't even necessary, RefreshMetrics worked by itself.  I made the same call on the DockingPaneManager and it fixed that too.<br /><br />The docking pane headers and pin/close buttons still render with a different theme than everything else, but I suspect that's by design.  It'd be great if they could make use of ribbon styles in a future version. :)<br /><br />Thanks a lot for your help!]]>
   </description>
   <pubDate>Fri, 19 Oct 2007 10:32:41 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8452&amp;PID=27461&amp;title=switching-themes-on-a-cxtptabclientwnd#27461</guid>
  </item> 
  <item>
   <title><![CDATA[Switching Themes on a CXTPTabClientWnd : Hi,  try this:  m_pClient-...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8452&amp;PID=27435&amp;title=switching-themes-on-a-cxtptabclientwnd#27435</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 8452<br /><strong>Posted:</strong> 19 October 2007 at 12:40am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>try this:</DIV><DIV>&nbsp;</DIV><DIV>m_pClient-&gt;Refresh();&nbsp;<BR>m_pClient-&gt;GetPaintManager()-&gt;RefreshMetrics();&nbsp;&nbsp;&nbsp;<BR></DIV>]]>
   </description>
   <pubDate>Fri, 19 Oct 2007 00:40:02 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8452&amp;PID=27435&amp;title=switching-themes-on-a-cxtptabclientwnd#27435</guid>
  </item> 
  <item>
   <title><![CDATA[Switching Themes on a CXTPTabClientWnd : No luck, unfortunately.  I tried...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8452&amp;PID=27429&amp;title=switching-themes-on-a-cxtptabclientwnd#27429</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3350">Jayonas</a><br /><strong>Subject:</strong> 8452<br /><strong>Posted:</strong> 18 October 2007 at 3:32pm<br /><br />No luck, unfortunately.<br /><br />I tried Refresh, RedrawWindow, and UpdateWindow, all to no avail.<br /><br />Another interesting thing to add to the mix.. I just added a few buttons that create new documents and docking panes arbitrarily.  If I switch themes and then create more documents and/or docking panes, even those brand new items are using the old theme.  I'd guess that doesn't matter much, since the DockingPaneManager is probably using the same drawing code whether or not its drawing a tab that was created before the switch or after.  I figured it couldn't hurt to mention it anyway, though.<br /><br />Any other ideas?]]>
   </description>
   <pubDate>Thu, 18 Oct 2007 15:32:39 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8452&amp;PID=27429&amp;title=switching-themes-on-a-cxtptabclientwnd#27429</guid>
  </item> 
  <item>
   <title><![CDATA[Switching Themes on a CXTPTabClientWnd : Hi,  try call Refresh method...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8452&amp;PID=27414&amp;title=switching-themes-on-a-cxtptabclientwnd#27414</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 8452<br /><strong>Posted:</strong> 18 October 2007 at 4:46am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>try call Refresh method of TabClient.</DIV>]]>
   </description>
   <pubDate>Thu, 18 Oct 2007 04:46:19 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8452&amp;PID=27414&amp;title=switching-themes-on-a-cxtptabclientwnd#27414</guid>
  </item> 
  <item>
   <title><![CDATA[Switching Themes on a CXTPTabClientWnd : Also, it turns out that I&amp;#039;m...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8452&amp;PID=27395&amp;title=switching-themes-on-a-cxtptabclientwnd#27395</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3350">Jayonas</a><br /><strong>Subject:</strong> 8452<br /><strong>Posted:</strong> 17 October 2007 at 4:21pm<br /><br />Also, it turns out that I'm having the same problem with docking panes.  When two panes are stacked (so they have tabs to switch between them) the tabs are having the exact same problem with not switching themes.<br /><br />A related question: are the docking pane title bars and Pin/Close buttons supposed to match the ribbon theme?  The best I could find to get it to do that was to set the pane manager use xtpPaneThemeOffice2007, but that doesn't seem to work.  It would be really nice if the panes could paint their title bars and Pin/Close buttons using the ribbon's paint manager like the tab client window does.<br /><br />Thanks again!]]>
   </description>
   <pubDate>Wed, 17 Oct 2007 16:21:45 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8452&amp;PID=27395&amp;title=switching-themes-on-a-cxtptabclientwnd#27395</guid>
  </item> 
  <item>
   <title><![CDATA[Switching Themes on a CXTPTabClientWnd : I&amp;#039;m working on making a UI...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8452&amp;PID=27393&amp;title=switching-themes-on-a-cxtptabclientwnd#27393</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3350">Jayonas</a><br /><strong>Subject:</strong> 8452<br /><strong>Posted:</strong> 17 October 2007 at 3:03pm<br /><br />I'm working on making a UI that is best described as Visual Studio with a ribbon.  I just put in the workspace area, using CXTPTabClientWnd, and was absolutely gleeful that it just picked up the theme that my ribbon was already using and rendered itself appropriately.  That is <strong>awesome</strong>.<br /><br />I have one minor problem: when I change themes the CXTPTabClientWnd only partially updates itself.  The current tab changes to reflect the new theme, but the background behind the tabs and the tabs which aren't selected retain the old theme.  Tabs that aren't selected actually use the new theme for their mouseover state, but go back to the old theme after the mouse leaves.<br /><br />Here's a screenshot:<br /><br /><img src="uploads/20071017_145102_TabTheme.jpg" border="0"><br /><br />I started with the black theme and then switched to silver.  Resource 1 is the current tab and correctly using the new theme.  Resource 0 is not the current tab and is incorrectly using the old theme.  Resource 2 has the mouse over it and only uses the new theme while in that state.  As soon as the mouse leaves it, it will go back to looking like Resource 0.  It's not shown in the picture, but the area of the tab control that has no tabs (including the Close and Arrow buttons) is also still using the old theme.<br /><br />Here's the code I'm using to change themes:<br /><br /><table width="99%"><tr><td><pre class="BBcode"><br />// record the newly selected theme<br />m_SelectedTheme = Theme;<br /><br />// determine the appropriate INI resource to load it from<br />LPCTSTR IniName = 0;<br />switch (m_SelectedTheme) {<br />&nbsp;&nbsp;&nbsp;&nbsp;case FrameTheme_Aqua:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IniName = _T("OFFICE2007AQUA_INI");<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br />&nbsp;&nbsp;&nbsp;&nbsp;case FrameTheme_Black:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IniName = _T("OFFICE2007BLACK_INI");<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br />&nbsp;&nbsp;&nbsp;&nbsp;case FrameTheme_Blue:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IniName = _T("OFFICE2007BLUE_INI");<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br />&nbsp;&nbsp;&nbsp;&nbsp;case FrameTheme_Silver:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IniName = _T("OFFICE2007SILVER_INI");<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br />}<br /><br />// set the new theme<br />((CXTPRibbonTheme*)this-&gt;GetCommandBars()-&gt;GetPaintManager())-&gt;SetImageHandle(g_Application.GetHandle(), IniName);<br /><br />// refresh everything if requested<br />if (Refresh) {<br />&nbsp;&nbsp;&nbsp;&nbsp;this-&gt;GetCommandBars()-&gt;GetImageManager()-&gt;RefreshAll();<br />&nbsp;&nbsp;&nbsp;&nbsp;this-&gt;GetCommandBars()-&gt;RedrawCommandBars();<br />&nbsp;&nbsp;&nbsp;&nbsp;this-&gt;SendMessage(WM_NCPAINT);<br />&nbsp;&nbsp;&nbsp;&nbsp;this-&gt;RedrawWindow(0, 0, RDW_ALLCHILDREN | RDW_INVALIDATE);<br />}<br /></pre></td></tr></table><br /><br />I would normally guess that there's method of CXTPTabClientWnd that I should be calling to have it refresh itself.  However, since it at least partially responds to the theme changing (the active tab does change correctly), I'm not so sure that I'm forgetting something.  In theory, I'd guess that passing RDW_ALLCHILDREN to RedrawWindow would cause any refreshing necessary (since the CXTPTabClientWnd instance is a child of the class that contains that code, which is the CXTPMDIFrameWnd).<br /><br />Any ideas?<br /><br />Thanks!]]>
   </description>
   <pubDate>Wed, 17 Oct 2007 15:03:25 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8452&amp;PID=27393&amp;title=switching-themes-on-a-cxtptabclientwnd#27393</guid>
  </item> 
 </channel>
</rss>