<?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 : Switching MDI Menus from simple to advanced</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : Switching MDI Menus from simple to advanced]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 09 Jun 2026 02:50:55 +0000</pubDate>
  <lastBuildDate>Fri, 15 Feb 2008 02:11:39 +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=9589</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[Switching MDI Menus from simple to advanced :    oleg wrote:If you don&amp;#039;t...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9589&amp;PID=31217&amp;title=switching-mdi-menus-from-simple-to-advanced#31217</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3049">Dexter</a><br /><strong>Subject:</strong> 9589<br /><strong>Posted:</strong> 15 February 2008 at 2:11am<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by oleg" alt="Originally posted by oleg" style="vertical-align: text-bottom;" /> <strong>oleg wrote:</strong><br /><br />If you don't need keep user customization for menus you can just call&nbsp;<div>&nbsp;pMenuBar-&gt;LoadMenu(&amp;cMenu);</div></td></tr></table><br><br>Thanks! Though it does make me feel a little strange as I tried so many different calls, both MFC and in the toolkit but not that one.<br><br>It certainly works but still leaves one problem. It will only change the menu for the document template of the current view and child frame. But I have two document templates that need to be changed, i.e. both templates should have either simple or advanced menus not one simple and the other advanced.<br><br>If I have to I could set a flag so that the next time a frame belonging to the other document template is activated it would make the appropriate call to CXTPMenuBar::LoadMenu(). <br><br>But if there is a way to set the menus for both document templates immediately that would certainly be much better.<br><br>Thanks,<br>Dexter<br>]]>
   </description>
   <pubDate>Fri, 15 Feb 2008 02:11:39 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9589&amp;PID=31217&amp;title=switching-mdi-menus-from-simple-to-advanced#31217</guid>
  </item> 
  <item>
   <title><![CDATA[Switching MDI Menus from simple to advanced : Hi,  If you don&amp;#039;t need...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9589&amp;PID=31213&amp;title=switching-mdi-menus-from-simple-to-advanced#31213</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 9589<br /><strong>Posted:</strong> 15 February 2008 at 1:41am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>If you don't need keep user customization for menus you can just call</DIV><DIV>&nbsp;</DIV><DIV>pMenuBar-&gt;LoadMenu(&amp;cMenu);</DIV>]]>
   </description>
   <pubDate>Fri, 15 Feb 2008 01:41:52 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9589&amp;PID=31213&amp;title=switching-mdi-menus-from-simple-to-advanced#31213</guid>
  </item> 
  <item>
   <title><![CDATA[Switching MDI Menus from simple to advanced : I am just finishing an MDI application...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9589&amp;PID=31206&amp;title=switching-mdi-menus-from-simple-to-advanced#31206</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3049">Dexter</a><br /><strong>Subject:</strong> 9589<br /><strong>Posted:</strong> 14 February 2008 at 9:27pm<br /><br />I am just finishing an MDI application that has two document templates, each with a separate menu. All works well, in fact extremely well.<br>But the menus are quite large and I would like to have a simple menu for each of the document templates which would be loaded at the begining but that users could change at any time.<br><br>I does not matter that any changes to the menus would be lost, in fact I prefer that if the user changes from simple to advanced mode they start fresh.<br><br>I have tried all sorts of things but can't seem to get it to work. The closest seemed to be using CXTPMenuBar::SwitchMDIMenu() as in the simplified code below from the CMainFrame class:<br><br><font face="Courier New, Courier, mono">&nbsp;&nbsp; if ( bSimpleMode ) { <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uMenu = IDR_DOC_DYNAMIC_SIMPLE;<br></font><font face="Courier New, Courier, mono">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uMenu = IDR_DOC_STATIC_SIMPLE;<br></font><font face="Courier New, Courier, mono">&nbsp;&nbsp; } else {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uMenu = IDR_DOC_DYNAMIC; // this is the id of the first template<br></font><font face="Courier New, Courier, mono">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uMenu = IDR_DOC_STATIC; // this is the id of the second template<br></font><font face="Courier New, Courier, mono">&nbsp;&nbsp; }<br><br>&nbsp;&nbsp; cMenu.LoadMenu( MIR( uMenu ) );<br>&nbsp;&nbsp; CXTPCommandBars* pCommandBars =&nbsp; GetCommandBars(); <br>&nbsp;&nbsp; pMenuBar = (CXTPMenuBar *)pCommandBars-&gt;GetMenuBar();<br>&nbsp;&nbsp; pMenuBar-&gt;SwitchMDIMenu( IDR_DOC_DYNAMIC, &amp;cMenu ); <br></font><br>and afterwards I tried various ways to redraw the command bars and window but all to no effect.<br><br>Any suggestions on how this could be done would be greatly appreciated!<br><br>Thanks,<br>Dexter of FileBoss<br><br>]]>
   </description>
   <pubDate>Thu, 14 Feb 2008 21:27:57 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9589&amp;PID=31206&amp;title=switching-mdi-menus-from-simple-to-advanced#31206</guid>
  </item> 
 </channel>
</rss>