<?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 : CMenu and custom XTP themes</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : CMenu and custom XTP themes]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 12 Jun 2026 00:56:28 +0000</pubDate>
  <lastBuildDate>Mon, 10 Apr 2006 05:24:44 +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=3965</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[CMenu and custom XTP themes :  Hi, I need a help/hint regarding...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=3965&amp;PID=12075&amp;title=cmenu-and-custom-xtp-themes#12075</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1921">klisa</a><br /><strong>Subject:</strong> 3965<br /><strong>Posted:</strong> 10 April 2006 at 5:24am<br /><br /><P>&#091;Environment: Windows XP SP2, Visual Studio 2003, XTP 9800.&#093;</P><P>Hi,</P><P>I need a help/hint regarding the usage of custom XTP themes. </P><P>Here's is the scenario:</P><P>- There is a simple custom paint theme in which paint and pane managers are derived from CXTPPaintManager and CXTPDockingPanePaintManager classes, respectively.<BR>- The main application window is a CXTPFrameWnd-derived window;<BR>- The main application menu is a regular MFC CMenu and not a CXTPMenuBar (this is important).</P><P>When the custom theme is applied like this (below is the main frame window's code)</P><P>&nbsp;&nbsp;&nbsp; CXTPPaintManager* customTheme = ...;<BR>&nbsp;&nbsp;&nbsp; CXTPPaintManager::SetCustomTheme(customTheme);<BR>&nbsp;&nbsp;&nbsp; CXTPDockingPanePaintManager* customPaneTheme = ...;<BR>&nbsp;&nbsp;&nbsp; GetDockingPaneManager()-&gt;SetCustomTheme(customPaneTheme);</P><P>the custom theme affects only toolbars/command bars that are created using GetCommandBars()-&gt;Add() and CXTPToolBar::LoadToolbar() methods. The main application menu (CMenu) remains drawn in whatever is the current XTP standard theme.</P><P>Now, if the main application menu becomes a command bar (that is, if it's created like this):</P><P>&nbsp;&nbsp;&nbsp; CXTPMenuBar* menuBar = GetCommandBars()-&gt;SetMenu(_T("Menu Bar"), IDR_MAINFRAME); </P><P>then the custom theme affects it.</P><P>Unfortunately, the main application menu absolutely has to stay a CMenu because of the existing code (a lots of it) that enumerates/adds/modifies/removes *CMenu* items. </P><P>Switching to CXTPMenuBar simply isn't an option because it would require all that code to be changed to work with CXTPCommandBars and CXTPControls instead.</P><P>The question:</P><P>Is there a way to keep CMenu as the main application menu (in other words, not to load it as a command bar) and still to have it drawn using the custom theme painting?</P><P>Thanks,<BR>Vladimir</P>]]>
   </description>
   <pubDate>Mon, 10 Apr 2006 05:24:44 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=3965&amp;PID=12075&amp;title=cmenu-and-custom-xtp-themes#12075</guid>
  </item> 
 </channel>
</rss>