<?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 : Pop-up menu not disappear in thread</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : Pop-up menu not disappear in thread]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 10 Jun 2026 11:35:15 +0000</pubDate>
  <lastBuildDate>Tue, 20 Mar 2007 22:04:09 +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=6378</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[Pop-up menu not disappear in thread : For the huge frame of the program,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6378&amp;PID=21308&amp;title=popup-menu-not-disappear-in-thread#21308</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2752">hijerry</a><br /><strong>Subject:</strong> 6378<br /><strong>Posted:</strong> 20 March 2007 at 10:04pm<br /><br />For the huge frame of the program, it's hard to call functions such as SendTrackLost to make the menu disappear. Is there a way to let the menu disappear automatically?]]>
   </description>
   <pubDate>Tue, 20 Mar 2007 22:04:09 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6378&amp;PID=21308&amp;title=popup-menu-not-disappear-in-thread#21308</guid>
  </item> 
  <item>
   <title><![CDATA[Pop-up menu not disappear in thread : Now  //ensure any popup menus...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6378&amp;PID=20335&amp;title=popup-menu-not-disappear-in-thread#20335</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2752">hijerry</a><br /><strong>Subject:</strong> 6378<br /><strong>Posted:</strong> 12 February 2007 at 9:15pm<br /><br /><P>Now </P><DIV>//ensure any popup menus are destroyed <BR>XTPMouseManager()-&gt;SendTrackLost(); </DIV><DIV>&nbsp;</DIV><DIV>works both in main thread and CWinThread.</DIV><DIV>Thanks again :)</DIV>]]>
   </description>
   <pubDate>Mon, 12 Feb 2007 21:15:44 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6378&amp;PID=20335&amp;title=popup-menu-not-disappear-in-thread#20335</guid>
  </item> 
  <item>
   <title><![CDATA[Pop-up menu not disappear in thread : This is exactly the same problem....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6378&amp;PID=20334&amp;title=popup-menu-not-disappear-in-thread#20334</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2502">lbvlad</a><br /><strong>Subject:</strong> 6378<br /><strong>Posted:</strong> 12 February 2007 at 8:32pm<br /><br />This is exactly the same problem. <br />Just when you switch from main thread to another thread and in main thread menu is open, you need to call SendTrackLost (but this time in the context of the main thread)]]>
   </description>
   <pubDate>Mon, 12 Feb 2007 20:32:21 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6378&amp;PID=20334&amp;title=popup-menu-not-disappear-in-thread#20334</guid>
  </item> 
  <item>
   <title><![CDATA[Pop-up menu not disappear in thread : Thanks. It does work now. The...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6378&amp;PID=20333&amp;title=popup-menu-not-disappear-in-thread#20333</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2752">hijerry</a><br /><strong>Subject:</strong> 6378<br /><strong>Posted:</strong> 12 February 2007 at 8:27pm<br /><br /><P>Thanks. It does work now. The menu in the CWinThread will disappear if I switch to the view of main thread. </P><DIV></DIV>But there is still a problem. When I switch&nbsp;the window from the view in main thread to &nbsp;the view in CWinThread, the menu of view in the main thread would not disappear.]]>
   </description>
   <pubDate>Mon, 12 Feb 2007 20:27:38 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6378&amp;PID=20333&amp;title=popup-menu-not-disappear-in-thread#20333</guid>
  </item> 
  <item>
   <title><![CDATA[Pop-up menu not disappear in thread : Hello,  you need to call  //ensure...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6378&amp;PID=20314&amp;title=popup-menu-not-disappear-in-thread#20314</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2502">lbvlad</a><br /><strong>Subject:</strong> 6378<br /><strong>Posted:</strong> 12 February 2007 at 2:32pm<br /><br />Hello,<br /><br />you need to call <br />//ensure any popup menus are destroyed<br />XTPMouseManager()-&gt;SendTrackLost();<br /><br />from the same thread where you have popped up the menu.<br /><br />for example, when user clicks on another window, send a special message to your CXXXView and execute code above.<br />It will break tracking loop inside a TrackMenuPopup.<br />]]>
   </description>
   <pubDate>Mon, 12 Feb 2007 14:32:19 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6378&amp;PID=20314&amp;title=popup-menu-not-disappear-in-thread#20314</guid>
  </item> 
  <item>
   <title><![CDATA[Pop-up menu not disappear in thread : Thanks for your suggestion. Anyway,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6378&amp;PID=20297&amp;title=popup-menu-not-disappear-in-thread#20297</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2752">hijerry</a><br /><strong>Subject:</strong> 6378<br /><strong>Posted:</strong> 12 February 2007 at 2:23am<br /><br />Thanks for your suggestion. Anyway, is there someone that&nbsp;met the same problem? Or is there any solution to make the menu disappear?]]>
   </description>
   <pubDate>Mon, 12 Feb 2007 02:23:27 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6378&amp;PID=20297&amp;title=popup-menu-not-disappear-in-thread#20297</guid>
  </item> 
  <item>
   <title><![CDATA[Pop-up menu not disappear in thread : Hello,generally it&amp;#039;s a good...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6378&amp;PID=20296&amp;title=popup-menu-not-disappear-in-thread#20296</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2014">akur</a><br /><strong>Subject:</strong> 6378<br /><strong>Posted:</strong> 12 February 2007 at 1:58am<br /><br />Hello,<br><br>generally it's a good idea to make all the <b><font color="#0000ff">GUI activity from the GUI thread</font></b> of your application (your "main" thread). I've run into different, more difficult problems in the past when I tried not to do so.<br>Limiting GUI interaction to the GUI thread will save you many troubles.<br>]]>
   </description>
   <pubDate>Mon, 12 Feb 2007 01:58:27 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6378&amp;PID=20296&amp;title=popup-menu-not-disappear-in-thread#20296</guid>
  </item> 
  <item>
   <title><![CDATA[Pop-up menu not disappear in thread :  If the view is created in main...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6378&amp;PID=20293&amp;title=popup-menu-not-disappear-in-thread#20293</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2752">hijerry</a><br /><strong>Subject:</strong> 6378<br /><strong>Posted:</strong> 12 February 2007 at 12:10am<br /><br /><DIV>&nbsp;</DIV><DIV>If the view is created in main thread, the pop-up menu works.</DIV><DIV>But if the view is created&nbsp;in a CWinThread, the pop-up menu do not disappear when I switch to another widow.</DIV><DIV>&nbsp;</DIV><DIV>Here is the codes: I create a pop-up menu in a MFC CView class:</DIV><DIV>&nbsp;</DIV><DIV><FONT color=#0000ff size=1><P>void</FONT><FONT size=1> CXXXView::OnContextMenu(CWnd* </FONT><FONT color=#008000 size=1>/*pWnd*/</FONT><FONT size=1>, CPoint point)</P><P>{</P><P></FONT><FONT color=#008000 size=1>// TODO: Add your message handler code here</P></FONT><FONT size=1><P>CMenu MainMenu;</P><P>MainMenu.LoadMenu(IDR_MAINFRAME );</P><P>CMenu* pCTRMKMenu= NULL;</P><P>CXTPPopupBar* pPopupBar = CXTPPopupBar::CreatePopupBar(0);</P><P>pCTRMKMenu = MainMenu.GetSubMenu(0);</P><P>pPopupBar-&gt;LoadMenu(pCTRMKMenu);</P><P>CXTPCommandBars::TrackPopupMenu(pPopupBar,TPM_RIGHTBUTTON|TPM_NONOTIFY,point.x, point.y,</FONT><FONT color=#0000ff size=1>this</FONT><FONT size=1>);</FONT><FONT size=1></P><P>pPopupBar-&gt;InternalRelease();</P><P>pPopupBar = NULL;</P><P>}</P></FONT></DIV>]]>
   </description>
   <pubDate>Mon, 12 Feb 2007 00:10:13 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6378&amp;PID=20293&amp;title=popup-menu-not-disappear-in-thread#20293</guid>
  </item> 
 </channel>
</rss>