<?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 : Setting Themes</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Setting Themes]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 21 Apr 2026 11:38:02 +0000</pubDate>
  <lastBuildDate>Thu, 16 Jun 2005 13:01:02 +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=2388</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[Setting Themes : Thanks James... Problem Solved...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2388&amp;PID=7114&amp;title=setting-themes#7114</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1196">JayW</a><br /><strong>Subject:</strong> 2388<br /><strong>Posted:</strong> 16 June 2005 at 1:01pm<br /><br /><P>Thanks James... Problem Solved&nbsp;&nbsp; <IMG src="http://forum.codejock.com/smileys/smiley4.gif" border="0"></P><P>Jay</P>]]>
   </description>
   <pubDate>Thu, 16 Jun 2005 13:01:02 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2388&amp;PID=7114&amp;title=setting-themes#7114</guid>
  </item> 
  <item>
   <title><![CDATA[Setting Themes : Does this thread help?  http:...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2388&amp;PID=7113&amp;title=setting-themes#7113</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=864">JamesH</a><br /><strong>Subject:</strong> 2388<br /><strong>Posted:</strong> 16 June 2005 at 12:00pm<br /><br /><P>Does this thread help?</P><P><A href="http://forum.codejock.com/forum_posts.asp?TID=1214&amp;KW=manifest" target="_blank"> http://forum.codejock.com/forum_posts.asp?TID=1214&amp;K W=manifest</A></P><P>&nbsp;</P>]]>
   </description>
   <pubDate>Thu, 16 Jun 2005 12:00:39 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2388&amp;PID=7113&amp;title=setting-themes#7113</guid>
  </item> 
  <item>
   <title><![CDATA[Setting Themes : I&amp;#039;m trying to get a consistent...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2388&amp;PID=7105&amp;title=setting-themes#7105</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1196">JayW</a><br /><strong>Subject:</strong> 2388<br /><strong>Posted:</strong> 16 June 2005 at 8:07am<br /><br /><P>I'm trying to get a consistent theme throughout my application (Whidbey) and so far have only been able to get the docking panes and menus to work.&nbsp; For example, my dialog (all derived from CTXResizeDialog) buttons are the standard MFC style and even the toolbar customization dialog (I used your code to the line...) comes up looking like this:</P><P><IMG src="uploads/JayW/2005-06-16_080127_StandardStyle.jpg" border="0"></P><P>instead of this (from your sample...):</P><P><IMG src="uploads/JayW/2005-06-16_080206_NewStyle.jpg" border="0"></P><P>Questions:</P><UL><LI>Do I have to override each button with your CXTButton class?</LI><LI>What is the basic procedure to make sure general UI elements have the correct theme?</LI></UL><P>I'm sorry for the obviously dumb question since I couldn't find the answer on the forums or by looking at the samples.&nbsp; </P><P>Jay</P><P>PS - Here is the OnCreate() and OnCustomize() code from MainFrm.cpp, the vast majority of which is lifted from your samples.&nbsp;</P><FONT color=#008000 size=2><P>/*</P><P>* Main window initialization on creation</P><P>*/</P></FONT><FONT color=#0000ff size=2><P>int</FONT><FONT size=2> CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) {</P><P>CXTPCommandBar *pMenuBar;</P><P>CXTPToolBar *pToolBar;</P><P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)</P><P></FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2> -1;</P><P></FONT><FONT color=#008000 size=2>/*</P><P>* Create Status bar.</P><P>* Important: All control bars including the Status Bar</P><P>* must be created before CommandBars.</P><P>*/</P></FONT><FONT size=2><P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (!m_wndStatusBar.Create(</FONT><FONT color=#0000ff size=2>this</FONT><FONT size=2>) ||</P><P>!m_wndStatusBar.SetIndicators(indicators,</P><P></FONT><FONT color=#0000ff size=2>sizeof</FONT><FONT size=2>(indicators)/</FONT><FONT color=#0000ff size=2>sizeof</FONT><FONT size=2>(UINT))) {</P><P>TRACE0("Failed to create status bar\n");</P><P></FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2> -1; </FONT><FONT color=#008000 size=2>// Failed to create</P></FONT><FONT size=2><P>}</P><P></FONT><FONT color=#008000 size=2>/*</P><P>* Initialize the command bars</P><P>*/</P></FONT><FONT size=2><P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (!InitCommandBars())</P><P></FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2> -1;</P><P></FONT><FONT color=#008000 size=2>/*</P><P>* Set "Whidbey" Theme (Note: Whidbey is the look and feel</P><P>* first implemented in Visual Studio .NET 2005. "Whidbey"</P><P>* was the project code name.)</P><P>*/</P></FONT><FONT size=2><P>CXTPPaintManager::SetTheme(xtpThemeWhidbey);</P><P></FONT><FONT color=#008000 size=2>/*</P><P>* Get a pointer to the command bars object.</P><P>*/</P></FONT><FONT size=2><P>m_pCommandBars = GetCommandBars();</P><P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2>(m_pCommandBars == NULL) {</P><P>TRACE0("Failed to create command bars object.\n");</P><P></FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2> -1; </FONT><FONT color=#008000 size=2>// Failed to create</P></FONT><FONT size=2><P>}</P><P></FONT><FONT color=#008000 size=2>/*</P><P>* Add the main menu bar for customization</P><P>*/</P></FONT><FONT size=2><P>pMenuBar = m_pCommandBars-&gt;SetMenu(_T("Menu Bar"), </P><P>IDR_MAINFRAME);</P><P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2>(pMenuBar == NULL) {</P><P>TRACE0("Failed to create menu bar.\n");</P><P></FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2> -1; </FONT><FONT color=#008000 size=2>// Failed to create</P></FONT><FONT size=2><P>}</P><P></FONT><FONT color=#008000 size=2>/*</P><P>* Create ToolBar</P><P>*/</P></FONT><FONT size=2><P>pToolBar = (CXTPToolBar*)</P><P>m_pCommandBars-&gt;Add(_T("Standard"), xtpBarTop);</P><P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (!pToolBar || !pToolBar-&gt;LoadToolBar(IDR_MAINFRAME)) {</P><P>TRACE0("Failed to create toolbar\n");</P><P></FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2> -1;</P><P>}</P><P></FONT><FONT color=#008000 size=2>/*</P><P>* Load the previous state for toolbars and menus.</P><P>*/</P></FONT><FONT size=2><P>LoadCommandBars(_T("CommandBars"));</P><P></FONT><FONT color=#008000 size=2>/*</P><P>* Initialize the docking pane manager.</P><P>* Do this only after all control bars objects</P><P>* have been created and docked.</P><P>*/</P></FONT><FONT size=2><P>m_paneManager.InstallDockingPanes(</FONT><FONT color=#0000ff size=2>this</FONT><FONT size=2>);</P><P>m_paneManager.SetTheme(xtpPaneThemeWhidbey);</P><P></FONT><FONT color=#008000 size=2>/*</P><P>* Create docking panes for Content and Resource view.</P><P>*/</P></FONT><FONT size=2><P>CXTPDockingPane* contentPane = m_paneManager.CreatePane(</P><P>IDR_VIEW_CONTENT_PANE, CRect(0, 0, 230, 140), xtpPaneDockLeft);</P><P>CXTPDockingPane* resourcePane = m_paneManager.CreatePane(</P><P>IDR_VIEW_RESOURCE_PANE, CRect(0, 0, 230, 140), xtpPaneDockLeft);</P><P>m_paneManager.AttachPane(resourcePane, contentPane);</P><P>contentPane-&gt;Select(); </FONT><FONT color=#008000 size=2>// Select Content view as the default tab</P></FONT><FONT size=2><P>contentPane-&gt;SetTitle(CONTENT_VIEW_PANE_TAB_TITLE);</P><P>resourcePane-&gt;SetTitle(RESOURCE_VIEW_PANE_TAB_TITLE);</P><P>CXTPImageManager* pImageManager = m_pCommandBars-&gt;GetImageManager();</P><P>pImageManager-&gt;InternalAddRef();</P><P>m_paneManager.SetImageManager(pImageManager);</P><P></FONT><FONT color=#008000 size=2>/*</P><P>* Enable the Whidbey-style docking helpers.</P><P>*/</P></FONT><FONT size=2><P>m_paneManager.SetAlphaDockingContext(TRUE);</P><P>m_paneManager.SetShowDockingContextStickers(TRUE);</P><P></FONT><FONT color=#008000 size=2>/*</P><P>* Set MDI child windows to be controlled by the tab </P><P>* interface. (The second argument enables tab groups.</P><P>*/</P></FONT><FONT size=2><P>VERIFY(m_MTIClientWnd.Attach(</FONT><FONT color=#0000ff size=2>this</FONT><FONT size=2>, TRUE));</P><P>m_MTIClientWnd.EnableToolTips(); </FONT><FONT color=#008000 size=2>// Shows full path in tool</P></FONT><FONT size=2><P></FONT><FONT color=#008000 size=2>// tips for tab.</P></FONT><FONT size=2><P></FONT><FONT color=#008000 size=2>/*</P><P>* Show/don't show icons on tabs depending on pref setting.</P><P>*/</P></FONT><FONT size=2><P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (appPrefs.IsBitPrefSet(SHOW_TAB_ICONS))</P><P>m_MTIClientWnd.GetPaintManager()-&gt;m_bShowIcons = TRUE;</P><P></FONT><FONT color=#0000ff size=2>else</P></FONT><FONT size=2><P>m_MTIClientWnd.GetPaintManager()-&gt;m_bShowIcons = FALSE;</P><P>m_MTIClientWnd.SetAllowReorder(TRUE); </FONT><FONT color=#008000 size=2>// Allow the tabs to be reordered</P></FONT><FONT size=2><P>theApp.SetGlobalTabFrame(&amp;m_MTIClientWnd);</P><P></FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2> 0;</P><P></P><P>}</P><P>&nbsp;</P><FONT color=#0000ff size=2><P>void</FONT><FONT size=2> CMainFrame::OnCustomize() {</P><P>CXTPCommandBars *m_pCommandBars;</P><P>CXTPCustomizeCommandsPage *pCommands;</P><P></FONT><FONT color=#008000 size=2>/*</P><P>* Get a pointer to the command bars object.</P><P>*/</P></FONT><FONT size=2><P>m_pCommandBars = GetCommandBars();</P><P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2>(m_pCommandBars != NULL) {</P><P></FONT><FONT color=#008000 size=2>/*</P><P>* Create the customize dialog object.</P><P>*/</P></FONT><FONT size=2><P>CXTPCustomizeSheet dlg(m_pCommandBars);</P><P></FONT><FONT color=#008000 size=2>/*</P><P>* Add the options page to the customize dialog.</P><P>*/</P></FONT><FONT size=2><P>CXTPCustomizeOptionsPage pageOptions(&amp;dlg);</P><P>dlg.AddPage(&amp;pageOptions);</P><P></FONT><FONT color=#008000 size=2>/*</P><P>* Add the commands page to the customize dialog.</P><P>*/</P></FONT><FONT size=2><P>pCommands = dlg.GetCommandsPage();</P><P>pCommands-&gt;AddCategories(IDR_MAINFRAME);</P><P></FONT><FONT color=#008000 size=2>/*</P><P>* Use the command bar manager to initialize the</P><P>* customize dialog.</P><P>*/</P></FONT><FONT size=2><P>pCommands-&gt;InsertAllCommandsCategory();</P><P>pCommands-&gt;InsertBuiltInMenus(IDR_MAINFRAME);</P><P>pCommands-&gt;InsertNewMenuCategory();</P><P></FONT><FONT color=#008000 size=2>/*</P><P>* Display the dialog.</P><P>*/</P></FONT><FONT size=2><P>dlg.DoModal();</P><P>}</P><P></FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2>;</P><P>}</P></FONT></FONT>]]>
   </description>
   <pubDate>Thu, 16 Jun 2005 08:07:42 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2388&amp;PID=7105&amp;title=setting-themes#7105</guid>
  </item> 
 </channel>
</rss>