<?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 : Adding Shell context menu to command bar popup</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : Adding Shell context menu to command bar popup]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 07:46:34 +0000</pubDate>
  <lastBuildDate>Thu, 07 Apr 2016 16:09:18 +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=22991</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[Adding Shell context menu to command bar popup : I&amp;#039;m trying to addShell context...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22991&amp;PID=74648&amp;title=adding-shell-context-menu-to-command-bar-popup#74648</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8978">gregnis@yahoo.com</a><br /><strong>Subject:</strong> 22991<br /><strong>Posted:</strong> 07 April 2016 at 4:09pm<br /><br />I'm trying to add&nbsp;Shell context menu as a popup item to a context command bar created using&nbsp;<div><br></div><div><div>GetCommandBars()-&gt;TrackPopupMenuEx(</div><div><span ="apple-tab-span"="" style="white-space:pre">	</span>&amp;m_menuPopup,</div><div><span ="apple-tab-span"="" style="white-space:pre">	</span>TPM_LEFTALIGN | TPM_LEFTBUTTON |</div><div><span ="apple-tab-span"="" style="white-space:pre">	</span>TPM_RIGHTBUTTON | TPM_RETURNCMD,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; point.x,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; point.y);</div></div><div><br></div><div><span style="line-height: 16.8px;">m_menuPopup here has a popup child item that will serve a&nbsp;</span>placeholder for the Shell context menu.<span style="line-height: 16.8px;">&nbsp;</span></div><div><br></div><div>I tried handling&nbsp;WM_XTP_CONTROLSELECTED or XTP_INITCOMMANDSPOPUP(), and while I'm able to show the Shell menu, multiple problems remain, most likely to the weird combination of command bar and regular menu (for example, I have to use the regular TrackPopupMenu to show the Shell menu, while already in the other&nbsp;<span style="line-height: 16.8px;">GetCommandBars()-&gt;TrackPopupMenuEx() ). The result is a crash on Shell menu selection, inability to move away from the Shell menu once it's open etc.&nbsp;</span></div><div><span style="line-height: 16.8px;"><br></span></div><div>Can this be done?</div><div><br></div><div>One choice is to use a regular parent context menu instead of command bar but that regular menu will not show icons and command accelerators.&nbsp;</div><div><br></div><div>Another thing I thought could be tried was to add Shell menu items to the command bar but I doubt that it would allow to properly process Shell commands.</div><div><br></div><div>Thanks in advance.</div>]]>
   </description>
   <pubDate>Thu, 07 Apr 2016 16:09:18 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22991&amp;PID=74648&amp;title=adding-shell-context-menu-to-command-bar-popup#74648</guid>
  </item> 
 </channel>
</rss>