<?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 : Menu Switching</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : Menu Switching]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 10 Jun 2026 06:14:56 +0000</pubDate>
  <lastBuildDate>Wed, 16 Aug 2006 03:27:07 +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=4789</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[Menu Switching : Thanks oleg.  This is much better....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4789&amp;PID=14939&amp;title=menu-switching#14939</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2250">tyousef</a><br /><strong>Subject:</strong> 4789<br /><strong>Posted:</strong> 16 August 2006 at 3:27am<br /><br /><P>Thanks oleg. </P><P>This is much better. I found out what I was missing and it's working now.</P><P>Thanks.</P>]]>
   </description>
   <pubDate>Wed, 16 Aug 2006 03:27:07 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4789&amp;PID=14939&amp;title=menu-switching#14939</guid>
  </item> 
  <item>
   <title><![CDATA[Menu Switching : Hi, Actually MFC and Toolkit...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4789&amp;PID=14892&amp;title=menu-switching#14892</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 4789<br /><strong>Posted:</strong> 14 August 2006 at 2:07pm<br /><br />Hi,<DIV>Actually MFC and Toolkit already have support of MDI child menus without doc temaplte.</DIV><DIV>&nbsp;</DIV><DIV>See Sample: <a href="https://forum.codejock.com/uploads/20060814_140640_ChildMenus.zip" target="_blank">uploads/20060814_140640_ChildMenus.zip</A></DIV><DIV>&nbsp;</DIV><DIV><a href="https://forum.codejock.com/uploads/20060814_140533_ChildMenus.zip" target="_blank">&nbsp;</DIV></A>]]>
   </description>
   <pubDate>Mon, 14 Aug 2006 14:07:00 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4789&amp;PID=14892&amp;title=menu-switching#14892</guid>
  </item> 
  <item>
   <title><![CDATA[Menu Switching : Thanks a lot oleg. It works.   BUT,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4789&amp;PID=14889&amp;title=menu-switching#14889</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2250">tyousef</a><br /><strong>Subject:</strong> 4789<br /><strong>Posted:</strong> 14 August 2006 at 1:01pm<br /><br />Thanks a lot oleg. It works. <DIV>&nbsp;</DIV><DIV>BUT, is it good to load the menu each time the frame is switched? Don't I need to free (unload) something&nbsp;before each loading?</DIV><DIV>&nbsp;</DIV><DIV>Also, what is the best way to restore the Mainframe menu when closing all the child frames?</DIV>]]>
   </description>
   <pubDate>Mon, 14 Aug 2006 13:01:32 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4789&amp;PID=14889&amp;title=menu-switching#14889</guid>
  </item> 
  <item>
   <title><![CDATA[Menu Switching : Hi,  try manually load menu:...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4789&amp;PID=14861&amp;title=menu-switching#14861</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 4789<br /><strong>Posted:</strong> 14 August 2006 at 9:11am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>try manually load menu:</DIV><DIV>&nbsp;</DIV><DIV>pCommandBars-&gt;GetMenuBar()-&gt;LoadMenu(pMenu);</DIV>]]>
   </description>
   <pubDate>Mon, 14 Aug 2006 09:11:54 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4789&amp;PID=14861&amp;title=menu-switching#14861</guid>
  </item> 
  <item>
   <title><![CDATA[Menu Switching : Hi, I&amp;#039;m working in a multi-Docapplication...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4789&amp;PID=14831&amp;title=menu-switching#14831</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2250">tyousef</a><br /><strong>Subject:</strong> 4789<br /><strong>Posted:</strong> 14 August 2006 at 1:59am<br /><br /><P>Hi,</P><DIV>I'm working in a multi-Doc&nbsp;application with no Doc-view arch. Just different child frame are loaded in the main frame. Each child frame is dynamically loaded from a separate dll. I need to switch to a different menu with each child frame. So, I simply load each menu in its dll </DIV><DIV>&nbsp;</DIV><DIV>int CModuleFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)</DIV><DIV>{</DIV><DIV>&nbsp;&nbsp; ...</DIV><DIV>&nbsp;&nbsp; HINSTANCE hClientResources = AfxGetResourceHandle();</DIV><DIV>&nbsp;&nbsp; HINSTANCE hnewInst = ::GetModuleHandle(_T("Module1.dll"));<BR>&nbsp;&nbsp; AfxSetResourceHandle(hnewInst);<DIV>&nbsp;&nbsp; m_hMenuShared= ::LoadMenu(hnewInst, MAKEINTRESOURCE(IDR_MODULE1_MENU));</DIV><DIV>&nbsp;&nbsp; AfxSetResourceHandle(hClientResources);</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp; ...</DIV></DIV><DIV>}</DIV><DIV>&nbsp;</DIV><DIV>and then set it on the MDI activation message.</DIV><DIV>&nbsp;</DIV><DIV>void CModuleFrame::OnMDIActivate(BOOL bActivate,CWnd* pActivateWnd,CWnd* pDeactivateWnd)<BR>{<BR>&nbsp;&nbsp;&nbsp;&nbsp; CMDIFrameWnd* pFrame = GetMDIFrame();<BR>&nbsp;&nbsp;&nbsp;&nbsp; if (pFrame)<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ::SendMessage(pFrame-&gt;m_hWndMDIClient, WM_MDISETMENU,&nbsp; (WPARAM)m_hMenuShared, (LPARAM)NULL);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;pFrame-&gt;DrawMenuBar();<BR>&nbsp;&nbsp;&nbsp; }<BR>}</DIV><DIV>&nbsp;</DIV><DIV>but this doesn't work?</DIV><DIV>&nbsp;</DIV><DIV>Am I missing something??</DIV><DIV>&nbsp;</DIV><DIV>Thanks</DIV>]]>
   </description>
   <pubDate>Mon, 14 Aug 2006 01:59:55 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4789&amp;PID=14831&amp;title=menu-switching#14831</guid>
  </item> 
 </channel>
</rss>