<?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 Menu</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Enable-Disable Menu]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 04 Apr 2026 05:36:15 +0000</pubDate>
  <lastBuildDate>Thu, 23 Aug 2007 08:33:50 +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=7863</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 Menu : Hi, In the FILE menu, under FILE...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7863&amp;PID=25352&amp;title=enabledisable-menu#25352</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2903">KumarCJ</a><br /><strong>Subject:</strong> 7863<br /><strong>Posted:</strong> 23 August 2007 at 8:33am<br /><br /><P>Hi,</P><P>In the FILE menu, under FILE menu we have Open, Save, Export (Export contain Export DB and Export Text submenu). </P><DIV>File menu looks like below:</DIV><P><strong>File<BR></strong>&nbsp; Open<BR>&nbsp; Save<BR>&nbsp; Export &gt; Export DB&nbsp;&nbsp;&nbsp; (ID_EXP_DB)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Export Text&nbsp; (IDM_EXP_TEXT)</P><DIV>&nbsp; Print</DIV><DIV>&nbsp; Exit</DIV><P><strong>How can I disable the "Export DB"</strong> <strong>which is submenu of "Export" menu, </strong>based on certain condition.</P><DIV>I tried with below given code. Please suggest.</DIV><DIV>&nbsp;</DIV><DIV>For rest of the menu items I am enabling and diabling using below code.</DIV><P>CXTPPopupBar* pCommandBar;</P><P>int nCount = pCommandBar-&gt;GetControls()-&gt;GetCount();<BR>int i = 0;<BR>for (i = 0; i &lt; nCount; i++)<BR>{<BR>CXTPControl* pCommandBarNew =&nbsp; pCommandBar-&gt;GetControl(i);<BR>&nbsp;<BR>if (pCommandBarNew-&gt;GetID() == ID_FILE_PRINT)&nbsp;//Print<BR>{<BR>&nbsp;if(var == NULL)<BR>{<BR>&nbsp;pCommandBarNew-&gt;SetEnabled(FALSE);<BR>&nbsp;pCommandBarNew-&gt;SetFlags(xtpFlagManualUpdate);<BR>}<BR>else<BR>{<BR>&nbsp;pCommandBarNew-&gt;SetEnabled(TRUE);<BR>&nbsp;pCommandBarNew-&gt;SetFlags(xtpFlagManualUpdate);<BR>}<BR>}<BR>}</P>]]>
   </description>
   <pubDate>Thu, 23 Aug 2007 08:33:50 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7863&amp;PID=25352&amp;title=enabledisable-menu#25352</guid>
  </item> 
 </channel>
</rss>