<?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 : Popup Menu Items Greyed / Disabled</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : Popup Menu Items Greyed / Disabled]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Thu, 16 Apr 2026 20:23:40 +0000</pubDate>
  <lastBuildDate>Thu, 06 Apr 2006 09:46:24 +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=1941</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[Popup Menu Items Greyed / Disabled : Hi,  Will reproduce it in a...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1941&amp;PID=12011&amp;title=popup-menu-items-greyed-disabled#12011</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1909">BruceW</a><br /><strong>Subject:</strong> 1941<br /><strong>Posted:</strong> 06 April 2006 at 9:46am<br /><br />Hi,<br><br>Will reproduce it in a small example project and load that up.<br><br>Thanks,<br><br>Bruce.<br><br>Re Icon, since there are no Ids I think I will have to use SetCustomIcon.]]>
   </description>
   <pubDate>Thu, 06 Apr 2006 09:46:24 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1941&amp;PID=12011&amp;title=popup-menu-items-greyed-disabled#12011</guid>
  </item> 
  <item>
   <title><![CDATA[Popup Menu Items Greyed / Disabled : Attach project in issuetrack and...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1941&amp;PID=12010&amp;title=popup-menu-items-greyed-disabled#12010</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 1941<br /><strong>Posted:</strong> 06 April 2006 at 9:40am<br /><br /><P>Attach project in issuetrack and we will find problem.</P><P>Call&nbsp; pControl-&gt;SetIconId(xx) to set item icon.</P>]]>
   </description>
   <pubDate>Thu, 06 Apr 2006 09:40:31 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1941&amp;PID=12010&amp;title=popup-menu-items-greyed-disabled#12010</guid>
  </item> 
  <item>
   <title><![CDATA[Popup Menu Items Greyed / Disabled : Hi,  I understand that, however...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1941&amp;PID=12009&amp;title=popup-menu-items-greyed-disabled#12009</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1909">BruceW</a><br /><strong>Subject:</strong> 1941<br /><strong>Posted:</strong> 06 April 2006 at 9:04am<br /><br />Hi,<br><br>I understand that, however it DOES work in my small example above, but not in "real life".<br><br>Is it possible to get icons to the labels where the icons are not in a resource file, and thus don't have an Id?<br><br>Thanks,<br><br>Bruce.<br>]]>
   </description>
   <pubDate>Thu, 06 Apr 2006 09:04:59 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1941&amp;PID=12009&amp;title=popup-menu-items-greyed-disabled#12009</guid>
  </item> 
  <item>
   <title><![CDATA[Popup Menu Items Greyed / Disabled : Hello, as I wrote - &amp;#034;pPopupBar-&amp;gt;LoadMenu&amp;#034;...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1941&amp;PID=12005&amp;title=popup-menu-items-greyed-disabled#12005</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 1941<br /><strong>Posted:</strong> 06 April 2006 at 7:49am<br /><br /><P>Hello,</P><P>as I wrote - "pPopupBar-&gt;LoadMenu" don't load state of items.</P><P>don't use pPopupBar-&gt;LoadMenu( &amp;menu ); and create all CXTPPopupBar dynamically.</P><P>&nbsp;CXTPPopupBar* pPopupBar = CXTPPopupBar::CreatePopupBar(0);<BR> pControl-&gt;pPopupBar-&gt;GetControls()-&gt;Add(xtpControlB utton, 1);</P><P>pControl-&gt;SetCaption(..).</P><P>pConttrol-&gt;SetEnabled(..);</P><P>etc.<BR></P>]]>
   </description>
   <pubDate>Thu, 06 Apr 2006 07:49:32 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1941&amp;PID=12005&amp;title=popup-menu-items-greyed-disabled#12005</guid>
  </item> 
  <item>
   <title><![CDATA[Popup Menu Items Greyed / Disabled : Hi,  Looking at the various...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1941&amp;PID=12002&amp;title=popup-menu-items-greyed-disabled#12002</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1909">BruceW</a><br /><strong>Subject:</strong> 1941<br /><strong>Posted:</strong> 06 April 2006 at 6:54am<br /><br />Hi,<br><br>Looking at the various examples and the online help, I tried a different approach, as follows (sample)<br><br>void<br>CMDISampleView::OnRButtonDown(UINT nFlags, CPoint point)<br>{<br><br>&nbsp;&nbsp;&nbsp; CMenu menu;<br>&nbsp;&nbsp;&nbsp; menu.CreatePopupMenu();<br>&nbsp;&nbsp;&nbsp; menu.AppendMenu( MF_GRAYED, 1, "Entry" );<br>&nbsp;&nbsp;&nbsp; menu.AppendMenu( MF_SEPARATOR );<br>&nbsp;&nbsp;&nbsp; menu.AppendMenu( MF_GRAYED, 1, "Entry" );<br><br>&nbsp;&nbsp;&nbsp; CMenu submenu;<br>&nbsp;&nbsp;&nbsp; submenu.CreatePopupMenu();<br>&nbsp;&nbsp;&nbsp; submenu.AppendMenu( MF_GRAYED, 1, "Entry" );<br>&nbsp;&nbsp;&nbsp; submenu.AppendMenu( MF_SEPARATOR );<br>&nbsp;&nbsp;&nbsp; submenu.AppendMenu( MF_ENABLED | MF_CHECKED, 1, "Entry" );<br>&nbsp;&nbsp;&nbsp; menu.AppendMenu( MF_STRING | MF_POPUP | MF_ENABLED,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; (UINT)submenu.m_hMenu,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; "Sub1" );<br><br>&nbsp;&nbsp;&nbsp; CXTPPopupBar* pPopupBar = CXTPPopupBar::CreatePopupBar(0);<br><br>&nbsp;&nbsp;&nbsp; pPopupBar-&gt;LoadMenu( &amp;menu );<br><br>&nbsp;&nbsp;&nbsp; POINT ptCursor;<br>&nbsp;&nbsp;&nbsp; CWinApp* pApp = AfxGetApp();<br>&nbsp;&nbsp;&nbsp; ::GetCursorPos(&amp;ptCursor);<br><br>&nbsp;&nbsp;&nbsp; UINT nReturn = CXTPCommandBars::TrackPopupMenu(pPopupBar, TPM_NONOTIFY| TPM_RETURNCMD, ptCursor.x, ptCursor.y,AfxGetMainWnd() );<br>}<br><br><br>This works fine in my small sample example.&nbsp; However when I do thesame in my main application (loading my CMenu the same way) it does notwork.&nbsp; They grayed items are not shown.<br><br>Is there some condition / size limit / other flags / etc.&nbsp; I am missing.<br><br>Thanks,<br><br>Bruce.<br>]]>
   </description>
   <pubDate>Thu, 06 Apr 2006 06:54:29 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1941&amp;PID=12002&amp;title=popup-menu-items-greyed-disabled#12002</guid>
  </item> 
  <item>
   <title><![CDATA[Popup Menu Items Greyed / Disabled : Yes, sorry, it does&amp;#039;n load...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1941&amp;PID=11987&amp;title=popup-menu-items-greyed-disabled#11987</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 1941<br /><strong>Posted:</strong> 05 April 2006 at 3:08pm<br /><br /><P>Yes, sorry, it does'n load this flag.</P><P>II recommend you build directly CXTPPopupBar/CXTPControl objects instead CMenu and convret it in TrackPopupMenu:</P><P>sample:</P><P>CXTPPopupBar* pPopupBar = CXTPPopupBar::CreatePopupBar(pCommandBars);</P><P>pPopupBar-&gt;GetControls()-&gt;Add(xtpControlButton);</P><P>...</P><P>pControl-&gt;SetEnabled(FALSE);</P><P>..</P><P>pControl-&gt;SetChecked(TRUE);</P><P>...</P><P>CXTPCommandBars::TrackPopupMenu(pPopupBar...)</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P>]]>
   </description>
   <pubDate>Wed, 05 Apr 2006 15:08:38 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1941&amp;PID=11987&amp;title=popup-menu-items-greyed-disabled#11987</guid>
  </item> 
  <item>
   <title><![CDATA[Popup Menu Items Greyed / Disabled : Hi,  I experience the same problem,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1941&amp;PID=11985&amp;title=popup-menu-items-greyed-disabled#11985</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1909">BruceW</a><br /><strong>Subject:</strong> 1941<br /><strong>Posted:</strong> 05 April 2006 at 2:04pm<br /><br />Hi,<br><br>I experience the same problem, even after setting TPM_NO_NOTIFY.&nbsp; My code is as follows:<br><br>&nbsp;&nbsp;&nbsp;&nbsp; ......<br><br>&nbsp;&nbsp;&nbsp;&nbsp; // get a pointer to the application window.<br>&nbsp;&nbsp;&nbsp; CXTPMDIFrameWnd* pMainWnd = DYNAMIC_DOWNCAST(CXTPMDIFrameWnd, AfxGetMainWnd());<br><br>&nbsp;&nbsp;&nbsp; // get a pointer to the CXTPCommandBars object.<br>&nbsp;&nbsp;&nbsp; CXTPCommandBars* pCommandBars = pMainWnd-&gt;GetCommandBars();<br><br>&nbsp;&nbsp;&nbsp; UINT nReturn = CXTPCommandBars::TrackPopupMenu(&amp;popupMenu, TPM_NONOTIFY | TPM_RECURSE | TPM_RETURNCMD, ptCursor.x,ptCursor.y, pMainWnd, 0, 0, pCommandBars );<br><br><br>The CMenu has been created completely dynamically with the entrieshaving the appropriate MF_GRAYED flag.&nbsp; It works if I use thestandard TrackPopupMenu, but not with CXTPCommandBars.<br><br>I am using a recently downloaded evaluation version.<br><br>Am I doing something wrong?<br><br>All help appreciated.<br><br>Thanks,<br><br>Bruce.<br>]]>
   </description>
   <pubDate>Wed, 05 Apr 2006 14:04:29 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1941&amp;PID=11985&amp;title=popup-menu-items-greyed-disabled#11985</guid>
  </item> 
  <item>
   <title><![CDATA[Popup Menu Items Greyed / Disabled : Short and Simple :-) Thank you!...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1941&amp;PID=5716&amp;title=popup-menu-items-greyed-disabled#5716</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=856">djtompa</a><br /><strong>Subject:</strong> 1941<br /><strong>Posted:</strong> 14 March 2005 at 7:41am<br /><br /><P>Short and Simple :-)</P><P>Thank you!</P>]]>
   </description>
   <pubDate>Mon, 14 Mar 2005 07:41:54 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1941&amp;PID=5716&amp;title=popup-menu-items-greyed-disabled#5716</guid>
  </item> 
  <item>
   <title><![CDATA[Popup Menu Items Greyed / Disabled : use TPM_NONOTIFY flag. ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1941&amp;PID=5651&amp;title=popup-menu-items-greyed-disabled#5651</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 1941<br /><strong>Posted:</strong> 10 March 2005 at 9:57am<br /><br />use TPM_NONOTIFY flag.]]>
   </description>
   <pubDate>Thu, 10 Mar 2005 09:57:04 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1941&amp;PID=5651&amp;title=popup-menu-items-greyed-disabled#5651</guid>
  </item> 
  <item>
   <title><![CDATA[Popup Menu Items Greyed / Disabled :  I &amp;#039;ve created a CXTMenu...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1941&amp;PID=5633&amp;title=popup-menu-items-greyed-disabled#5633</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=856">djtompa</a><br /><strong>Subject:</strong> 1941<br /><strong>Posted:</strong> 09 March 2005 at 10:42am<br /><br /><FONT size=2><P>I 've created a CXTMenu m_mymenu which&nbsp;I want to display.</P><P>CXTPCommandBars::TrackPopupMenu(m_mymenu,NULL, p.x, p.y, m_myview);</P><P>Using above command the menu displays correctly, but all entries are grey. This only happens if I use on-the-fly-generated ids in Ap<FONT size=2>pendMenu(...)</FONT>. If ids from e.g. the ToolBar are used everything works fine. What's the problem?</P></FONT>]]>
   </description>
   <pubDate>Wed, 09 Mar 2005 10:42:40 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1941&amp;PID=5633&amp;title=popup-menu-items-greyed-disabled#5633</guid>
  </item> 
 </channel>
</rss>