<?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 : Manually changing main menu in an MDI app</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : General Discussion : Manually changing main menu in an MDI app]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Thu, 14 May 2026 01:59:00 +0000</pubDate>
  <lastBuildDate>Mon, 04 Jul 2005 02:04:33 +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=2439</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[Manually changing main menu in an MDI app : try. pCommandBars-&amp;gt;GetMenuBar()-&amp;gt;LoadMenu...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2439&amp;PID=7431&amp;title=manually-changing-main-menu-in-an-mdi-app#7431</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 2439<br /><strong>Posted:</strong> 04 July 2005 at 2:04am<br /><br /><P>try.</P><P>pCommandBars-&gt;GetMenuBar()-&gt;LoadMenu</P>]]>
   </description>
   <pubDate>Mon, 04 Jul 2005 02:04:33 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2439&amp;PID=7431&amp;title=manually-changing-main-menu-in-an-mdi-app#7431</guid>
  </item> 
  <item>
   <title><![CDATA[Manually changing main menu in an MDI app : Well, I found a fix for MFC/Windows...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2439&amp;PID=7252&amp;title=manually-changing-main-menu-in-an-mdi-app#7252</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1196">JayW</a><br /><strong>Subject:</strong> 2439<br /><strong>Posted:</strong> 23 June 2005 at 2:06pm<br /><br /><P>Well, I found a fix for MFC/Windows in general, but it isn't going to work with Command Bars.&nbsp; I'm going to post a more honed request in a different thread so consider this one dead.</P><P>Jay</P>]]>
   </description>
   <pubDate>Thu, 23 Jun 2005 14:06:02 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2439&amp;PID=7252&amp;title=manually-changing-main-menu-in-an-mdi-app#7252</guid>
  </item> 
  <item>
   <title><![CDATA[Manually changing main menu in an MDI app : I have an application with several...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2439&amp;PID=7248&amp;title=manually-changing-main-menu-in-an-mdi-app#7248</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1196">JayW</a><br /><strong>Subject:</strong> 2439<br /><strong>Posted:</strong> 23 June 2005 at 8:12am<br /><br /><P>I have an application with several MDI-based editor windows (similar in appearance to Visual Studio/Dreamweaver, etc.), but it also has docking panes containing tree controls and properties which are not doc/view windows. Using the CMultiDocTemplate template class, I faithfully registered each editor document type with its own resources (menus, accelerator tables, etc.) and menus change properly when you switch back and forth between different editor views as expected. However, I cannot seem to manually load menus when, for example, a pane containing a tree view of the document hierarchy gets focus. I tried the following code but strangely, when I look at it in the debugger, m_hMenuDefault is always NULL when entering the function, which obviously will not work (it's hard to destroy a menu that doesn't exist...)</P><P>void CMainFrame::SetMainMenu(UINT nIDResource) <BR>{</P><P>&nbsp;&nbsp;&nbsp; ASSERT(nIDResource);</P><P>&nbsp;&nbsp;&nbsp; // Remove/destroy old menu<BR>&nbsp;&nbsp;&nbsp; SetMenu(NULL);<BR>&nbsp;&nbsp;&nbsp; ::DestroyMenu(m_hMenuDefault);</P><P>&nbsp;&nbsp;&nbsp; // Add the requested menu<BR>&nbsp;&nbsp;&nbsp; m_defaultMenu.LoadMenu(nIDResource);<BR>&nbsp;&nbsp;&nbsp; ASSERT(m_defaultMenu);</P><P>&nbsp;&nbsp;&nbsp; SetMenu(&amp;m_defaultMenu);<BR>&nbsp;&nbsp;&nbsp; m_hMenuDefault = m_defaultMenu.m_hMenu;</P><P>}</P><P>Thanks in advance,</P><P>Jay<BR></P>]]>
   </description>
   <pubDate>Thu, 23 Jun 2005 08:12:33 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2439&amp;PID=7248&amp;title=manually-changing-main-menu-in-an-mdi-app#7248</guid>
  </item> 
 </channel>
</rss>