<?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 : How to apply Skins to Ribbon Bar</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Skin Framework : How to apply Skins to Ribbon Bar]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 05 Apr 2026 18:55:38 +0000</pubDate>
  <lastBuildDate>Wed, 31 Mar 2010 13:50:24 +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=16543</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[How to apply Skins to Ribbon Bar : If ribbons work the same as regular...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16543&amp;PID=57885&amp;title=how-to-apply-skins-to-ribbon-bar#57885</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3717">Smucker</a><br /><strong>Subject:</strong> 16543<br /><strong>Posted:</strong> 31 March 2010 at 1:50pm<br /><br />If ribbons work the same as regular command bars, you just need set the style to NativeWinXP. The code below is copied from a routine I use to keep command bar themes, pane themes, and grid themes in synch, along with allowing for skins:<br><br><b><font color="#0033ff" face="Courier New, Courier, mono">&nbsp; if (XTPSkinManager()-&gt;LoadSkin(filename) ) {<br>&nbsp;&nbsp;&nbsp; CXTPCommandBars* pbars = GetCommandBars();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // From main frame<br>&nbsp; &nbsp; XTPPaintManager()-&gt;SetTheme(xtpThemeNativeWinXP);<br>&nbsp; &nbsp; pbars-&gt;GetImageManager()-&gt;RefreshAll();<br>&nbsp; &nbsp; pbars-&gt;UpdateCommandBars();<br>&nbsp;&nbsp;&nbsp; pbars-&gt;RedrawCommandBars();<br>&nbsp;&nbsp;&nbsp; ApplySkin();<br>&nbsp; }</font><br></b><br>ApplySkin() looks like this:<br><b><br><font color="#3333ff" face="Courier New, Courier, mono">void CMainFrame::ApplySkin()<br>{<br>&nbsp;&nbsp;&nbsp; DWORD options = xtpSkinApplyColors;<br><br>&nbsp;&nbsp;&nbsp; XTPPaintManager()-&gt;RefreshMetrics();<br>&nbsp;&nbsp;&nbsp; if (m_skinning) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (m_skinframe)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; options |= xtpSkinApplyFrame; //|xtpSkinApplyMetrics;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; XTPSkinManager()-&gt;SetApplyOptions(options);<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; XTPSkinManager()-&gt;SetAutoApplyNewWindows(TRUE);<br>&nbsp;&nbsp;&nbsp; XTPSkinManager()-&gt;SetAutoApplyNewThreads(TRUE);<br>&nbsp;&nbsp;&nbsp; XTPSkinManager()-&gt;EnableCurrentThread();<br>&nbsp;&nbsp;&nbsp; XTPSkinManager()-&gt;ApplyWindow(GetSafeHwnd());<br>&nbsp;&nbsp;&nbsp; XTPSkinManager()-&gt;RedrawAllControls();<br>&nbsp;&nbsp;&nbsp; ExcludeSkinModules(XTPSkinManager());<br>&nbsp;&nbsp;&nbsp; OnSysColorChange();<br>&nbsp;&nbsp;&nbsp; RedrawWindow(0, 0, RDW_INVALIDATE|RDW_UPDATENOW|RDW_ERASE|RDW_ALLCHILDREN);&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>}</font></b><font face="Courier New, Courier, mono"><br></font><br>I'm probably doing some unnecessary repainting, but this isn't something that happens that often, so I'm not worried about it.<br><br>]]>
   </description>
   <pubDate>Wed, 31 Mar 2010 13:50:24 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16543&amp;PID=57885&amp;title=how-to-apply-skins-to-ribbon-bar#57885</guid>
  </item> 
  <item>
   <title><![CDATA[How to apply Skins to Ribbon Bar : Hello CJ Team,   We have implemented...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16543&amp;PID=57871&amp;title=how-to-apply-skins-to-ribbon-bar#57871</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2796">Makarand</a><br /><strong>Subject:</strong> 16543<br /><strong>Posted:</strong> 31 March 2010 at 6:30am<br /><br />Hello CJ Team,<br /><br /><br />We have implemented Ribbon bar in our application previously we are using normal toolbar where we can apply different skin to the application (Code as follow).<br /><br />-------------------------------------------------<br /><br /> switch (iStyleNo)<br />&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;case None:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;XTPSkinManager()-&gt;LoadSkin(_T(""), _T(""));&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />&nbsp;&nbsp;&nbsp;case Office2007Style:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;XTPSkinManager()-&gt;LoadSkin(m_strStylesPath + _T("Office2007.cjstyles"), _T("NormalBlue.INI"));<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />&nbsp;&nbsp;&nbsp;case WindowsVistaStyle:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;XTPSkinManager()-&gt;LoadSkin(m_strStylesPath + _T("Vista.cjstyles"), _T("NormalBlue.INI"));<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />&nbsp;&nbsp;&nbsp;case WindowsVistaStyleBlack:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;XTPSkinManager()-&gt;LoadSkin(m_strStylesPath + _T("Vista.cjstyles"), _T("NormalBlack.INI"));<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case WindowsXPLunaStyle:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;XTPSkinManager()-&gt;LoadSkin(m_strStylesPath + _T("WinXP.Luna.cjstyles"), _T("NormalBlue.INI"));<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  <br />&nbsp;&nbsp;&nbsp;case WindowsXPRoyalStyle:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;XTPSkinManager()-&gt;LoadSkin(m_strStylesPath + _T("WinXP.Royale.cjstyles"), _T("NormalRoyale.INI"));<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />}<br /> <br />XTPSkinManager()-&gt;SetApplyOptions(XTPSkinManager()-&gt;GetApplyOptions() | xtpSkinApplyMetrics);&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;XTPPaintManager()-&gt;RefreshMetrics();<br /><br />-------------------------------------------------------<br />  <br /> <br />Now we have ribbon bar with the replacement of toolbar in that case we are not able to set the skin to the Ribon bar.<br /><br />Is it possible to set the style to the Ribbon bar? if yes then How can we apply? <br /><br />-Mak]]>
   </description>
   <pubDate>Wed, 31 Mar 2010 06:30:10 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16543&amp;PID=57871&amp;title=how-to-apply-skins-to-ribbon-bar#57871</guid>
  </item> 
 </channel>
</rss>