<?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 : MDIMenu Reset</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : MDIMenu Reset]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Thu, 11 Jun 2026 00:24:35 +0000</pubDate>
  <lastBuildDate>Mon, 24 Sep 2007 17:24:03 +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=8147</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[MDIMenu Reset :  How do you programmatically...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8147&amp;PID=26396&amp;title=mdimenu-reset#26396</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3220">cradke</a><br /><strong>Subject:</strong> 8147<br /><strong>Posted:</strong> 24 September 2007 at 5:24pm<br /><br /><DIV><FONT size=2><FONT size=2><DIV>How do you programmatically reset the MDIMenus?</DIV><DIV>&nbsp;</DIV><DIV>The MenuBarMDIMenu doesn't have a Reset method and there doesn't seem to be a way to get a CommandBar interface from an MenuBarMDIMenu object.&nbsp; QueryInterface fails so does MenuBarMDIMenu.Controls.Parent.</DIV><DIV>&nbsp;</DIV><DIV>The problem is with saving the Customizations of the menu.&nbsp; I set StateOptions.SaveOnlyCustomized to true but all the menus are always saved unless I manually reset each menu from the Customize dialog.</DIV><DIV>&nbsp;</DIV><DIV>My code goes something like this:<BR></DIV><DIV>1) Add an mdi menu,&nbsp; </DIV><DIV>pIMenuBar-&gt;GetMDIMenus()-&gt;Add(MenuBarId, _bstr_t(Name), _bstr_t()));</DIV><DIV>&nbsp;</DIV><DIV>2) Add the controls to the menu.</DIV><DIV>&nbsp;</DIV><DIV>3) Tell command bars these are the default values, pICommandBarControls-&gt;CreateOriginalControls();</DIV><DIV>&nbsp;</DIV><DIV>4) Reset the menu so Command doesn't think it has been changed.&nbsp; <strong>(How?)<BR></strong></DIV><DIV>&nbsp;</DIV></FONT></FONT></DIV>]]>
   </description>
   <pubDate>Mon, 24 Sep 2007 17:24:03 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8147&amp;PID=26396&amp;title=mdimenu-reset#26396</guid>
  </item> 
 </channel>
</rss>