<?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 : Multiple Skins for Multiple CommandBars</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Skin Framework : Multiple Skins for Multiple CommandBars]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 05 Apr 2026 18:28:15 +0000</pubDate>
  <lastBuildDate>Fri, 23 Nov 2012 08:39:05 +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=20320</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[Multiple Skins for Multiple CommandBars : HiI have an application which...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=20320&amp;PID=69270&amp;title=multiple-skins-for-multiple-commandbars#69270</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=7732">dang</a><br /><strong>Subject:</strong> 20320<br /><strong>Posted:</strong> 23 November 2012 at 8:39am<br /><br />Hi<div><br></div><div>I have an application which uses XTP Themes throughout. I have recently added a modal dialog with several pages using Skin Framework, each page having a different skin. This works fine.</div><div><br></div><div>However, I am using a CXTPPopupBar on one of the pages for a pop-up menu, and this is not skinned correctly. On another page I am using a CMenu, and this skins correctly, but I cannot use CMenu for the other as I need features of CommandBars such as&nbsp;SetCloseSubMenuOnClick(false).</div><div><br></div><div>Reading these forums, it seems that to get CommandBars to be skinned, you need to do pPopupBar-&gt;SetPaintManager( new CXTPNativeXPTheme ) in a handler for WM_XTP_INITCOMMANDSPOPUP (i.e. after the hwnd is created). This works in that the popup is skinned, but it has the wrong skin.</div><div><br></div><div>Looking a little deeper, it seems that&nbsp;CXTPNativeXPTheme::RefreshMetrics gets looks up AfxGetMainWnd to get skinning info, rather than the window being skinned...</div><div><br></div><div>I tried deriving my own PaintManager from&nbsp;CXTPNativeXPTheme and overriding RefreshMetrics to use a specific window I know has the right skin applied to it. However, this does not work - it seems that in the hooked drawing functions for CommandBars the skin is looked up based on CXTPSkinManager::m_pSchema - the 'top level' schema named "NormalDefault_ini" - where I need it to look up the skin data from a specific child schema/ini.</div><div><br></div><div>I have tried calling CXTPSKinManager::LoadSkin("mySkins.cjstyles", "specificSkin.ini"), hoping to set the 'current' skin on the SkinManager, but of course this then affects the whole application behind the modal dialog.</div><div><br></div><div>Is there a way to have multiple CommandBars using multiple skins at the same time? It seems that it is designed with the assumption that only one skin at a time would ever be used with CommandBars. I hope this is not the case!</div><div><br></div><div>Any suggestions?</div><div><br></div><div>Thanks.</div>]]>
   </description>
   <pubDate>Fri, 23 Nov 2012 08:39:05 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=20320&amp;PID=69270&amp;title=multiple-skins-for-multiple-commandbars#69270</guid>
  </item> 
 </channel>
</rss>