<?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 : How to dynamically remove menu items?</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : How to dynamically remove menu items?]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 23:48:23 +0000</pubDate>
  <lastBuildDate>Thu, 17 Jan 2013 06:38:15 +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=153</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[How to dynamically remove menu items? : hi  i think you can invisible...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=153&amp;PID=69574&amp;title=how-to-dynamically-remove-menu-items#69574</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1827">free_user</a><br /><strong>Subject:</strong> 153<br /><strong>Posted:</strong> 17 January 2013 at 6:38am<br /><br /><p>hi</p><p>i think you can invisible action of "M2" when you want ro remove it.</p>]]>
   </description>
   <pubDate>Thu, 17 Jan 2013 06:38:15 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=153&amp;PID=69574&amp;title=how-to-dynamically-remove-menu-items#69574</guid>
  </item> 
  <item>
   <title><![CDATA[How to dynamically remove menu items? : How remove some menuitem if its...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=153&amp;PID=69011&amp;title=how-to-dynamically-remove-menu-items#69011</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=7513">dearvivekkumar</a><br /><strong>Subject:</strong> 153<br /><strong>Posted:</strong> 01 October 2012 at 6:12am<br /><br />How remove some menuitem if its happen to be of Popup menu like<br>File&nbsp;&nbsp;&nbsp;&nbsp; Edit&nbsp;&nbsp;&nbsp;&nbsp; Test&nbsp;&nbsp;&nbsp;&nbsp; Help<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; M1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; M2&nbsp;&nbsp;&nbsp; &gt;&nbsp; S1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; S2<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; S3<br><br>I want to remove "M2" here<br>]]>
   </description>
   <pubDate>Mon, 01 Oct 2012 06:12:19 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=153&amp;PID=69011&amp;title=how-to-dynamically-remove-menu-items#69011</guid>
  </item> 
  <item>
   <title><![CDATA[How to dynamically remove menu items? : Hello, You can do this (modify...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=153&amp;PID=423&amp;title=how-to-dynamically-remove-menu-items#423</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1">kstowell</a><br /><strong>Subject:</strong> 153<br /><strong>Posted:</strong> 01 November 2003 at 2:39pm<br /><br /><P>Hello,</P><P>You can do this (modify menu items dynamically) by handling the WM_XTP_INITCOMMANDSPOPUP message, for example:<BR>&nbsp;<BR><FONT face="Courier New, Courier, mono" color=#000000>BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //{{AFX_MSG_MAP(CMainFrame)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ON_WM_CREATE()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //}}AFX_MSG_MAP<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ON_XTP_INITCOMMANDSPOPUP()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ON_XTP_CREATECONTROL()<BR>END_MESSAGE_MAP()<BR>&nbsp;<BR>void CMainFrame::OnInitCommandsPopup(CXTPCommandBar* pCommandBar)<BR>{<BR>&nbsp;&nbsp;&nbsp; // get the list of commands for the popup.<BR>&nbsp;&nbsp;&nbsp; CXTPControls* pCommandList = pCommandBar-&gt;GetControls();<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp; // Remove "New" menu item from the File menu.<BR>&nbsp;&nbsp;&nbsp; CXTPControl* pCommandNew = pCommandList-&gt;FindControl(<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xtpControlButton, ID_FILE_NEW, TRUE, FALSE);<BR>&nbsp;&nbsp;&nbsp; if (pCommandNew)<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pCommandList-&gt;Remove(pCommandNew);<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp; // Rename menu item "Save" to "Save Document".<BR>&nbsp;&nbsp;&nbsp; CXTPControl* pCommandSave = pCommandList-&gt;FindControl(<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xtpControlButton, ID_FILE_SAVE, TRUE, FALSE);<BR>&nbsp;&nbsp;&nbsp; if (pCommandSave)<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pCommandSave-&gt;SetCaption("&amp;Save Document");<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp; // Rename menu item "Print..." to "Print Document...".<BR>&nbsp;&nbsp;&nbsp; CXTPControl* pCommandPrint = pCommandList-&gt;FindControl(<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xtpControlButton, ID_FILE_PRINT, TRUE, FALSE);<BR>&nbsp;&nbsp;&nbsp; if (pCommandPrint)<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pCommandPrint-&gt;SetCaption("&amp;Print Document...");<BR>&nbsp;&nbsp;&nbsp; }<BR>}</FONT></P><P><FONT face="Courier New, Courier, mono"><FONT face=Tahoma>Cheers,<BR>Codejock Support</FONT></P></FONT>]]>
   </description>
   <pubDate>Sat, 01 Nov 2003 14:39:32 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=153&amp;PID=423&amp;title=how-to-dynamically-remove-menu-items#423</guid>
  </item> 
  <item>
   <title><![CDATA[How to dynamically remove menu items? : How can you dynamically remove...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=153&amp;PID=318&amp;title=how-to-dynamically-remove-menu-items#318</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=124">daniel001</a><br /><strong>Subject:</strong> 153<br /><strong>Posted:</strong> 08 September 2003 at 4:37pm<br /><br /><P>How can you dynamically remove menu items from your main menu in the XTreme Toolkit Pro?</P><P>I use to do something like this:</P><P>void CMainFrame::OnUpdateMenuItem(CCmdUI* pCmdUI)<BR>{</P><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><P>pCmdUI-&gt;m_pMenu-&gt;RemoveMenu(pCmdUI-&gt;m_nID, MF_BYCOMMAND)</P></BLOCKQUOTE><P>}</P><P>But now using the CommandBars it crashes because m_pMenu = NULL</P><P>Help!</P><P>&nbsp;</P>]]>
   </description>
   <pubDate>Mon, 08 Sep 2003 16:37:14 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=153&amp;PID=318&amp;title=how-to-dynamically-remove-menu-items#318</guid>
  </item> 
 </channel>
</rss>