<?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 : CXTTreeCtrl Context Menu</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : CXTTreeCtrl Context Menu]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 14 Jun 2026 18:07:19 +0000</pubDate>
  <lastBuildDate>Mon, 26 Feb 2007 11:18:45 +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=6503</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[CXTTreeCtrl Context Menu : Or check MSDN here: http://su...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6503&amp;PID=20743&amp;title=cxttreectrl-context-menu#20743</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2036">Kukis</a><br /><strong>Subject:</strong> 6503<br /><strong>Posted:</strong> 26 February 2007 at 11:18am<br /><br /><P>Or check MSDN here:</P><DIV><a href="http://support.microsoft.com/kb/222905" target="_blank">http://support.microsoft.com/kb/222905</A></DIV>]]>
   </description>
   <pubDate>Mon, 26 Feb 2007 11:18:45 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6503&amp;PID=20743&amp;title=cxttreectrl-context-menu#20743</guid>
  </item> 
  <item>
   <title><![CDATA[CXTTreeCtrl Context Menu : Hello,  Sounds like you may...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6503&amp;PID=20731&amp;title=cxttreectrl-context-menu#20731</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1">kstowell</a><br /><strong>Subject:</strong> 6503<br /><strong>Posted:</strong> 25 February 2007 at 11:19pm<br /><br />Hello,<DIV>&nbsp;</DIV><DIV>Sounds like you may be using a CXTTreeView? If so there is a bug in MFC that prevents WM_CONTEXTMENU from getting fired correctly for a CTreeView or CListView derived class.</DIV><DIV>&nbsp;</DIV><DIV>Even if you are not using a CTreeView you should be able to use the following code as a work around, add a WM_RBUTTONDOWN handler in place of your WM_CONTEXTMENU handler, for example:</DIV><DIV>&nbsp;</DIV><DIV><table width="99%"><tr><td><pre class="BBcode">BEGIN_MESSAGE_MAP(CTestAppView, CTreeView)<BR>&nbsp;&nbsp;&nbsp; //{{AFX_MSG_MAP(CTestAppView)<BR>&nbsp;&nbsp;&nbsp; ON_WM_RBUTTONDOWN()<BR>&nbsp;&nbsp;&nbsp; //}}AFX_MSG_MAP<BR>END_MESSAGE_MAP()<BR></DIV><DIV>void CTestAppView::OnRButtonDown(UINT nFlags, CPoint point) <BR>{<BR>&nbsp;&nbsp;&nbsp; CPoint pt = point;<BR>&nbsp;&nbsp;&nbsp; ClientToScreen(&amp;pt);<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; if (pt.x == -1 &amp;&amp; pt.y == -1)<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // keystroke invocation<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CRect rect;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GetClientRect(rect);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ClientToScreen(rect);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pt = rect.TopLeft();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pt.Offset(5, 5);<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; CMenu menu;<BR>&nbsp;&nbsp;&nbsp; VERIFY(menu.LoadMenu(CG_IDR_POPUP_TEST_APP_VIEW));<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; CMenu* pPopup = menu.GetSubMenu(0);<BR>&nbsp;&nbsp;&nbsp; ASSERT(pPopup != NULL);<BR>&nbsp;&nbsp;&nbsp; CWnd* pWndPopupOwner = this;<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; while (pWndPopupOwner-&gt;GetStyle() &amp; WS_CHILD)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pWndPopupOwner = pWndPopupOwner-&gt;GetParent();<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; pPopup-&gt;TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt.x, pt.y,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pWndPopupOwner);<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; CTreeView::OnRButtonDown(nFlags, point);<BR>}</pre></td></tr></table></DIV><DIV>&nbsp;</DIV><DIV>Hope this helps.</DIV><DIV>&nbsp;</DIV><DIV>Regards,<BR></DIV><DIV>Kirk Stowell</DIV><DIV>Codejock Software</DIV>]]>
   </description>
   <pubDate>Sun, 25 Feb 2007 23:19:46 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6503&amp;PID=20731&amp;title=cxttreectrl-context-menu#20731</guid>
  </item> 
  <item>
   <title><![CDATA[CXTTreeCtrl Context Menu : I have a CXTTreeCtrl where I want...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6503&amp;PID=20729&amp;title=cxttreectrl-context-menu#20729</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2484">webjeff</a><br /><strong>Subject:</strong> 6503<br /><strong>Posted:</strong> 25 February 2007 at 5:16pm<br /><br />I have a <FONT size=2>CXTTreeCtrl where I want to right click on a node and have functions listed on that node.<DIV></DIV><P>I added a function on the command "WM_CONTEXTMENU" and that works, except you need to double right-click.&nbsp; I can't seem to figure out why that is, nor do I see any other ways to bring up the context menu.</P><DIV></DIV><P>Any ideas why WM_CONTEXTMENU requires a double right click?</P><DIV></DIV><P>Thanks</P><DIV></DIV><P>Jeff</FONT></P>]]>
   </description>
   <pubDate>Sun, 25 Feb 2007 17:16:27 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6503&amp;PID=20729&amp;title=cxttreectrl-context-menu#20729</guid>
  </item> 
 </channel>
</rss>