<?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 : Problems with c&#111;ntext menu</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : Problems with c&#111;ntext menu]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 28 Apr 2026 10:06:36 +0000</pubDate>
  <lastBuildDate>Sun, 02 Nov 2003 16:13:02 +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=207</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[Problems with c&#111;ntext menu :  I&amp;#039;ve created a CTreeView...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=207&amp;PID=462&amp;title=problems-with-context-menu#462</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=222">jamiei</a><br /><strong>Subject:</strong> 207<br /><strong>Posted:</strong> 02 November 2003 at 4:13pm<br /><br /><FONT size=2><FONT size=2><P><FONT face="Arial, Helvetica, sans-serif" size=2>I've created a CTreeView derived class that is then attached to a docking pane using AttachView. Inside this derived class I've overridden the OnContextMenu method where I want to display a context menu.</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2>The code that does this is as follows:</FONT></P><P>&nbsp;</P><P><FONT face="Courier New, Courier, mono" size=2>CMenu menu;</FONT></P><P><FONT face="Courier New, Courier, mono" size=2>menu.LoadMenu( IDR_MAINFRAME );</FONT></P><P><FONT face="Courier New, Courier, mono" size=2>CMenu* pMenu = menu.GetSubMenu(0);</FONT></P><P></FONT><FONT color=#008000></FONT><P><FONT size=2><FONT face="Courier New, Courier, mono"><FONT color=#008000></P></FONT></FONT><FONT face="Courier New, Courier, mono">CXTPPopupBar popup;</FONT></FONT></P><P><FONT face="Courier New, Courier, mono" size=2>popup.LoadMenu( pMenu );</FONT></P><P><FONT face="Courier New, Courier, mono" size=2>popup.Popup( point.x, point.y, 0 );</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2></FONT>&nbsp;</P><P><FONT face="Arial, Helvetica, sans-serif" size=2>For some reason, this only seems to be called if I double click on the view. For example, if I just right click once in the tree control's area&nbsp;I get nothing, if I double click then a menu is displayed before being destroyed straight away. I added a call to MessageBox just to block the code and the menu does appear, but as I said, as soon as the code continues the menu is destroyed.</FONT></P><P><FONT face=Arial size=2>I've not found anything about using the pop-up menus (yet) so it's possible I've used the classes in the wrong way. However, what is slightly weirder is the fact I need to double click to get it displayed.</FONT></P><P><FONT face=Arial size=2>If anyone can shed any light I'd be very grateful. I've so far found using/creating the docking panes fairly problematic!</FONT></P></FONT>]]>
   </description>
   <pubDate>Sun, 02 Nov 2003 16:13:02 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=207&amp;PID=462&amp;title=problems-with-context-menu#462</guid>
  </item> 
 </channel>
</rss>