<?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 : TrackPopupMenu on secondary UI thread</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : TrackPopupMenu on secondary UI thread]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Thu, 11 Jun 2026 07:25:09 +0000</pubDate>
  <lastBuildDate>Wed, 23 Jul 2008 10:02:52 +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=11551</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[TrackPopupMenu on secondary UI thread : We use MFC Commandbars (v11.2)...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11551&amp;PID=38778&amp;title=trackpopupmenu-on-secondary-ui-thread#38778</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4363">qliklars</a><br /><strong>Subject:</strong> 11551<br /><strong>Posted:</strong> 23 July 2008 at 10:02am<br /><br />We use MFC Commandbars (v11.2) in our application and in addition to building an "ordinary" application (EXE-file) we also build an ActiveX control (OCX-file).<DIV>&nbsp;</DIV><DIV>In order to meet several requirements on the OCX, the UI is run on a different thread from the main thread in the application hosting the OCX.</DIV><DIV>&nbsp;</DIV><DIV>We have noticed that TrackPopupMenu behaves strangely in this scenario.</DIV><DIV>If you bring it up, but click outside the menu (and outside the OCX) but inside the host application, the menu will not close.</DIV><DIV>&nbsp;</DIV><DIV>I noticed that a <strong>MouseManager</strong> is used and that the <strong>MouseManager</strong> installs a mouse hook. The mouse hook is installed on the thread that runs the OCX UI, which means that it will not detect mouse messages sent to the main application and the menu will not be closed.</DIV><DIV>&nbsp;</DIV><DIV>Is there a controlled way to solve this problem?</DIV>]]>
   </description>
   <pubDate>Wed, 23 Jul 2008 10:02:52 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11551&amp;PID=38778&amp;title=trackpopupmenu-on-secondary-ui-thread#38778</guid>
  </item> 
 </channel>
</rss>