<?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 : Enable/Disable buttons in CXTPToolBar</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Enable/Disable buttons in CXTPToolBar]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 20 Apr 2026 23:55:17 +0000</pubDate>
  <lastBuildDate>Tue, 22 Mar 2011 18:31:01 +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=18093</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[Enable/Disable buttons in CXTPToolBar : It works, thanks a lot.   ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18093&amp;PID=63481&amp;title=enable-disable-buttons-in-cxtptoolbar#63481</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6694">zeiga</a><br /><strong>Subject:</strong> 18093<br /><strong>Posted:</strong> 22 March 2011 at 6:31pm<br /><br />It works, thanks a lot.&nbsp;]]>
   </description>
   <pubDate>Tue, 22 Mar 2011 18:31:01 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18093&amp;PID=63481&amp;title=enable-disable-buttons-in-cxtptoolbar#63481</guid>
  </item> 
  <item>
   <title><![CDATA[Enable/Disable buttons in CXTPToolBar : If you don&amp;#039;t use handler...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18093&amp;PID=63444&amp;title=enable-disable-buttons-in-cxtptoolbar#63444</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 18093<br /><strong>Posted:</strong> 22 March 2011 at 1:16am<br /><br />If you don't use handler you must set special flag to ignore it:<div><br></div><div>pControl-&gt;SetFlags(xtpFlagManualUpdate);</div>]]>
   </description>
   <pubDate>Tue, 22 Mar 2011 01:16:54 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18093&amp;PID=63444&amp;title=enable-disable-buttons-in-cxtptoolbar#63444</guid>
  </item> 
  <item>
   <title><![CDATA[Enable/Disable buttons in CXTPToolBar : I created a CXTPToolBar with several...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18093&amp;PID=63441&amp;title=enable-disable-buttons-in-cxtptoolbar#63441</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6694">zeiga</a><br /><strong>Subject:</strong> 18093<br /><strong>Posted:</strong> 21 March 2011 at 5:55pm<br /><br />I created a <i>CXTPToolBar </i>with several buttons. One of the buttons is "<i>Action</i>", and its handler is <i>OnAction()</i>. Here is my problem: After<i> OnAction() </i>is executed, all the buttons on the toolbar seem to be reset and <b><i>enabled</i></b>!<br><br>A self-written method <i>RefreshToolBarButtons()</i> is called at the end of <i>OnAction()</i> function to update the enable/disable status of all the buttons. (Yes, for some reason, I didn't use <i>ON_UPDATE_COMMAND_UI</i> handler.) I expect all the buttons <b>should be disabled </b>after calling <i>RefreshToolBarButtons()</i> because the visual studio debugger stepped through the following:<br>{....<br>CXTPControl* pButtonAction = pToolBar-&gt;GetControls()-&gt;FindControl(xtpControlButton, ID_ACTION, TRUE, FALSE);<br>CXTPControl* pButtonAnotherAction = pToolBar-&gt;GetControls()-&gt;FindControl(xtpControlButton, ID_ANOTHER_ACTION, TRUE, FALSE);<br>pButtonAction-&gt;SetEnabled(FALSE);<br>pButtonAnother-&gt;SetEnabled(FALSE);<br>....<br>}<br><br>Note:<br>I tried several ways, but it still does not work.<br><ol><li>Added <i>pCommandBars-&gt;GetCommandBarsOptions()-&gt;bDisableCommandIfNoHandler = TRUE;</i></li><li>call <i>pToolBar-&gt;UpdateWindow();</i> after calling <i>SetEnabled(FALSE)</i>.<br></li></ol>Any suggestions are appreciated. <br><br>]]>
   </description>
   <pubDate>Mon, 21 Mar 2011 17:55:56 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18093&amp;PID=63441&amp;title=enable-disable-buttons-in-cxtptoolbar#63441</guid>
  </item> 
 </channel>
</rss>