<?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 : Disabling a sub menu</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Disabling a sub menu]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 12 Jun 2026 01:37:34 +0000</pubDate>
  <lastBuildDate>Tue, 04 Apr 2006 14:53:36 +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=3938</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[Disabling a sub menu : Oleg, thanks. I am actually doing...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=3938&amp;PID=11964&amp;title=disabling-a-sub-menu#11964</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1568">fishy</a><br /><strong>Subject:</strong> 3938<br /><strong>Posted:</strong> 04 April 2006 at 2:53pm<br /><br />Oleg, thanks.&nbsp; <br>I am actually doing just that right now (checking the index).&nbsp; It works okay (until I add something to the menu and forget to change the index in the code).&nbsp; Its unfortunate that this is the only other solution.&nbsp; I think codejock could provide a better way to do this in the command bars implementation.&nbsp; If I could set some 32 bit user-defined value to a menu item in OnCreateControl then in OnInitCommandsPopup I could check that value to determine which menu item I was actually working with.<br><br>- fishy<br>]]>
   </description>
   <pubDate>Tue, 04 Apr 2006 14:53:36 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=3938&amp;PID=11964&amp;title=disabling-a-sub-menu#11964</guid>
  </item> 
  <item>
   <title><![CDATA[Disabling a sub menu : Hello, Other solutions don&amp;#039;t...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=3938&amp;PID=11957&amp;title=disabling-a-sub-menu#11957</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 3938<br /><strong>Posted:</strong> 04 April 2006 at 2:13pm<br /><br /><P>Hello,</P><P>Other solutions don't exist. When you create menus in IDE Menu editor you only specify Caption and Index, so you can determine Popup only by caption or index. No other ways instead of manually create all menus without IDE's editor.</P><P>so you can try to check index of popup&nbsp;:</P><P>if (lpCreateControl-&gt;nindex == xxx)...</P>]]>
   </description>
   <pubDate>Tue, 04 Apr 2006 14:13:37 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=3938&amp;PID=11957&amp;title=disabling-a-sub-menu#11957</guid>
  </item> 
  <item>
   <title><![CDATA[Disabling a sub menu : Oleg, you missed the point. Your...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=3938&amp;PID=11955&amp;title=disabling-a-sub-menu#11955</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1568">fishy</a><br /><strong>Subject:</strong> 3938<br /><strong>Posted:</strong> 04 April 2006 at 1:43pm<br /><br />Oleg, you missed the point. Your "solution" includes checking the caption string!&nbsp; I don't want to do anything hackish like this.&nbsp; (I can't rely on the caption string being anything fixed -- think about the case with different languages.).&nbsp; Also, in OnCreateControl, when you assign an ID ( lpCreateControl-&gt;nID = SOME_ID ) to a sub-menu (not the leaf item itself), then in OnInitCommandsPopup, GetBarID() returns 0, not the ID you assigned.&nbsp; I still haven't found a solution to this, any more help?]]>
   </description>
   <pubDate>Tue, 04 Apr 2006 13:43:11 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=3938&amp;PID=11955&amp;title=disabling-a-sub-menu#11955</guid>
  </item> 
  <item>
   <title><![CDATA[Disabling a sub menu : Hello, Solution is to catch OnCreateControl...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=3938&amp;PID=11948&amp;title=disabling-a-sub-menu#11948</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 3938<br /><strong>Posted:</strong> 04 April 2006 at 9:15am<br /><br /><P>Hello,</P><P>Solution is to catch OnCreateControl event and assign some id to use it for Update handler:</P><P>&nbsp;&nbsp;if (lpCreateControl-&gt;controlType == xtpControlPopup &amp;&amp; lpCreateControl-&gt;strCaption == _T("&amp;Copy"))<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;//lpCreateControl-&gt;controlType = xtpControlSplitButtonPopup;<BR>&nbsp;&nbsp;&nbsp;lpCreateControl-&gt;nID = ID_EDIT_COPY;<BR>&nbsp;&nbsp;&nbsp;return TRUE;<BR>&nbsp;&nbsp;}</P>]]>
   </description>
   <pubDate>Tue, 04 Apr 2006 09:15:40 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=3938&amp;PID=11948&amp;title=disabling-a-sub-menu#11948</guid>
  </item> 
  <item>
   <title><![CDATA[Disabling a sub menu : Hello,I would like to disable...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=3938&amp;PID=11945&amp;title=disabling-a-sub-menu#11945</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1568">fishy</a><br /><strong>Subject:</strong> 3938<br /><strong>Posted:</strong> 04 April 2006 at 7:39am<br /><br />Hello,<br>I would like to disable a sub-menu, not an item itself, the actual menu.&nbsp; For example, in Outlook there is a File-&gt;New-&gt;Mail message, File-&gt;New-&gt;Folder, etc...&nbsp; It is easy to disable the "Mail message" and "Folder" menu items with an update ui handler.&nbsp; It is not so easy however, to disable the "New" sub-menu.&nbsp; I have tried using OnInitCommandsPopup but this doesn't get me very far since I can't tell what sub-menu i want to disable (they seem to all have an ID of 0).&nbsp; I can check the text of the sub menu itself and disable it if the text matches, but this is not an acceptable solution since the text can be different (languages, etc..).&nbsp; What is the proper solution for this problem?<br>]]>
   </description>
   <pubDate>Tue, 04 Apr 2006 07:39:51 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=3938&amp;PID=11945&amp;title=disabling-a-sub-menu#11945</guid>
  </item> 
 </channel>
</rss>