<?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 : About Dynamically Remove Button From ToolBar</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : About Dynamically Remove Button From ToolBar]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 10 Jun 2026 06:33:41 +0000</pubDate>
  <lastBuildDate>Wed, 20 Sep 2006 01:43:42 +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=5096</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[About Dynamically Remove Button From ToolBar : Thanks, it works! ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5096&amp;PID=15883&amp;title=about-dynamically-remove-button-from-toolbar#15883</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2346">martypku</a><br /><strong>Subject:</strong> 5096<br /><strong>Posted:</strong> 20 September 2006 at 1:43am<br /><br />Thanks, it works!]]>
   </description>
   <pubDate>Wed, 20 Sep 2006 01:43:42 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5096&amp;PID=15883&amp;title=about-dynamically-remove-button-from-toolbar#15883</guid>
  </item> 
  <item>
   <title><![CDATA[About Dynamically Remove Button From ToolBar : Hello,  You can add some method...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5096&amp;PID=15881&amp;title=about-dynamically-remove-button-from-toolbar#15881</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 5096<br /><strong>Posted:</strong> 20 September 2006 at 1:16am<br /><br />Hello,<DIV>&nbsp;</DIV><DIV>You can add some method which loop&nbsp; controls and check if control with pControl-&gt;IsTemporary()&nbsp;&nbsp;== FALSE exists.</DIV><DIV>&nbsp;</DIV><DIV>BOOL HasButtons(CXTPToolBar* pToolBar)<BR>{</DIV><DIV>&nbsp; for (int i = 0; i &lt; pToolBar-&gt;GetControls()-&gt;GetCount(); i++)&nbsp;<BR>&nbsp; {</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp; if (!pToolBar-&gt;GetControl(i)-&gt;IsTemporary())</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return TRUE;</DIV><DIV>&nbsp; }</DIV><DIV>&nbsp; return FALSE:&nbsp; </DIV><DIV>}</DIV>]]>
   </description>
   <pubDate>Wed, 20 Sep 2006 01:16:12 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5096&amp;PID=15881&amp;title=about-dynamically-remove-button-from-toolbar#15881</guid>
  </item> 
  <item>
   <title><![CDATA[About Dynamically Remove Button From ToolBar : I want to remove button from a...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5096&amp;PID=15877&amp;title=about-dynamically-remove-button-from-toolbar#15877</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2346">martypku</a><br /><strong>Subject:</strong> 5096<br /><strong>Posted:</strong> 19 September 2006 at 11:52pm<br /><br />I want to remove button from a toolbar dynamically. <DIV>&nbsp;</DIV><DIV>I use the following code:</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;CXTPControl* pControl = pToolBar-&gt;GetControls()-&gt;FindControl(nCmdID);<BR>&nbsp;&nbsp;if(pControl == NULL) continue;<BR>&nbsp;&nbsp;pToolBar-&gt;GetControls()-&gt;Remove(pControl);</DIV><DIV>&nbsp;</DIV><DIV>If I remove all buttons from a toolbar, I want to remove the toolbar also. So I write:</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;int nTbBtnCount = pToolBar-&gt;GetControls()-&gt;GetCount();<BR>&nbsp;&nbsp;if(nTbBtnCount&nbsp; == 0)<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;pToolBar-&gt;GetControls()-&gt;ClearOriginalControls();<BR>&nbsp;&nbsp;&nbsp;GetCommandBars()-&gt;Remove(pToolBar);<BR>&nbsp;&nbsp;}</DIV><DIV>&nbsp;</DIV><DIV>This is supposed to be right. However, I find that when the toolbar is visible(sometimes it is not the only case), the&nbsp;toolbar&nbsp;buttons include "close" and "toolbar options" buttons, which are system buttons. So my question is how I know the toolbar has no my own button.</DIV>]]>
   </description>
   <pubDate>Tue, 19 Sep 2006 23:52:06 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5096&amp;PID=15877&amp;title=about-dynamically-remove-button-from-toolbar#15877</guid>
  </item> 
 </channel>
</rss>