<?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 : Remove menu item at runtime</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Remove menu item at runtime]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 13 Apr 2026 02:18:03 +0000</pubDate>
  <lastBuildDate>Fri, 24 Jun 2005 20:23:32 +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=2445</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[Remove menu item at runtime : To remove items, this is what...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2445&amp;PID=7268&amp;title=remove-menu-item-at-runtime#7268</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=133">thodgson</a><br /><strong>Subject:</strong> 2445<br /><strong>Posted:</strong> 24 June 2005 at 8:23pm<br /><br /><P><FONT color=#0000ff>To remove items, this is what we use:</FONT></P><P><FONT color=#0000ff>CXTPControl</FONT>* <FONT color=#808080>pCommandMenuItem</FONT> = <FONT color=#808080>pCommandList</FONT>-&gt;<FONT color=#880000>FindControl</FONT>(xtpControlButton, <FONT color=#a000a0>ID_MENU_ITEM</FONT>, <FONT color=#a000a0>TRUE</FONT>, <FONT color=#a000a0>FALSE</FONT>);<BR><FONT color=#0000ff>if</FONT> (<FONT color=#808080>pCommandMenuItem</FONT>)<BR>{<BR><FONT color=#808080>&nbsp;&nbsp;&nbsp;&nbsp; pCommandMenuItem</FONT>-&gt;<FONT color=#880000>Remove</FONT>(<FONT color=#808080>pCommandStopService</FONT>);<BR>}</P>]]>
   </description>
   <pubDate>Fri, 24 Jun 2005 20:23:32 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2445&amp;PID=7268&amp;title=remove-menu-item-at-runtime#7268</guid>
  </item> 
  <item>
   <title><![CDATA[Remove menu item at runtime : Try the following:   CXTPControls*...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2445&amp;PID=7267&amp;title=remove-menu-item-at-runtime#7267</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=945">larryp</a><br /><strong>Subject:</strong> 2445<br /><strong>Posted:</strong> 24 June 2005 at 4:18pm<br /><br />Try the following:<br><br>&nbsp;<span style="color: rgb(0, 0, 255);">&nbsp;&nbsp; CXTPControls* pControls = NULL;</span><br style="color: rgb(0, 0, 255);"><br style="color: rgb(0, 0, 255);"><span style="color: rgb(0, 0, 255);">&nbsp;&nbsp;&nbsp; CXTPCommandBars* pCommandBars = GetCommandBars();</span><br style="color: rgb(0, 0, 255);"><span style="color: rgb(0, 0, 255);">&nbsp;&nbsp;&nbsp; if ( pCommandBars != NULL ) {</span><br style="color: rgb(0, 0, 255);"><span style="color: rgb(0, 0, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CXTPMenuBar* pMenuBar = pCommandBars-&gt;GetMenuBar();</span><br style="color: rgb(0, 0, 255);"><span style="color: rgb(0, 0, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if ( pMenuBar != NULL ) {</span><br style="color: rgb(0, 0, 255);"><span style="color: rgb(0, 0, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pControls = pMenuBar-&gt;GetControls();</span><br style="color: rgb(0, 0, 255);"><span style="color: rgb(0, 0, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }</span><br style="color: rgb(0, 0, 255);"><span style="color: rgb(0, 0, 255);">&nbsp;&nbsp;&nbsp; }</span><br style="color: rgb(0, 0, 255);"><span style="color: rgb(0, 0, 255);">&nbsp;&nbsp;&nbsp; if ( pControls != NULL ) {</span><br style="color: rgb(0, 0, 255);"><br style="color: rgb(0, 0, 255);"><span style="color: rgb(0, 0, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // Hide the button from the menu</span><br style="color: rgb(0, 0, 255);"><span style="color: rgb(0, 0, 255);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CXTPControl* pControl =pControls-&gt;FindControl(xtpControlButton, ID_FILE_LOGOFF, FALSE,TRUE);</span><br style="color: rgb(0, 0, 255);"><span style="color: rgb(0, 0, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if ( pControl != NULL )&nbsp; {</span><br style="color: rgb(0, 0, 255);"><span style="color: rgb(0, 0, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pControl-&gt;SetVisible (FALSE);</span><br style="color: rgb(0, 0, 255);"><span style="color: rgb(0, 0, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp; }<br style="color: rgb(0, 0, 255);"></span><br>Larry<br>]]>
   </description>
   <pubDate>Fri, 24 Jun 2005 16:18:42 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2445&amp;PID=7267&amp;title=remove-menu-item-at-runtime#7267</guid>
  </item> 
  <item>
   <title><![CDATA[Remove menu item at runtime : Hello, I&amp;#039;m using XToolKit...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2445&amp;PID=7258&amp;title=remove-menu-item-at-runtime#7258</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1241">XIII</a><br /><strong>Subject:</strong> 2445<br /><strong>Posted:</strong> 24 June 2005 at 3:26am<br /><br />Hello,<br>I'm using XToolKit Pro and I don't know how to remove menu item at runtime ?<br><br>Before Xtoolkit i did it like this : <br>&nbsp;&nbsp;&nbsp; ((CMainFrame *)m_pMainWnd)-&gt;GetMenu()-&gt;RemoveMenu(ID_FILE_PRINT, MF_BYCOMMAND);<br>&nbsp;&nbsp;&nbsp; pCmdUI-&gt;Enable(FALSE);<br><br>Can anybody help me ?<br><br>Thanks<br>]]>
   </description>
   <pubDate>Fri, 24 Jun 2005 03:26:48 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2445&amp;PID=7258&amp;title=remove-menu-item-at-runtime#7258</guid>
  </item> 
 </channel>
</rss>