<?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 : Lockup in TrackPopupMenu</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : Lockup in TrackPopupMenu]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 20 Jun 2026 13:29:59 +0000</pubDate>
  <lastBuildDate>Thu, 16 Sep 2021 16:03:36 +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=24210</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[Lockup in TrackPopupMenu : I have traced a lockup in our...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24210&amp;PID=78239&amp;title=lockup-in-trackpopupmenu#78239</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3213">rdhd</a><br /><strong>Subject:</strong> 24210<br /><strong>Posted:</strong> 16 September 2021 at 4:03pm<br /><br /><div>I have traced a lockup in our app to two things going on in CodeJock. We hare in CXTPCommandBars::TrackPopupMenu. It is calling CXTPPopupBar::PumPMessage. We get stuck with the GetMessage call in that code constantly getting a TTM_DEL message. When it gets the message, the code calls ::DispatchMessage. So far so good.</div><div><br></div><div>Except, the code ends up in CXTPToolTipContextToolTip::DelTool and it does this when we lock up<br></div><div><br></div><div>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; PostMessage(TTM_DELTOOL, 0, reinterpret_cast&lt;LPARAM&gt;(lpToolInfo));<br></div><div><br></div><div>The result is that the PumpMessage code just keeps dispatch TTM_DELTOOL only to have another message posted right back to the message queue.</div><div><br></div><div>So how did I get into this state? On the context menu we have a flyout. And, we have a string in our string table that has value 65555 (0xffff). That becomes -1. As we move over the context menu, CJ will call OnToolHitTest for that item. But, CJ doesn't care that the value is -1 because the control has a tooltip on it.</div><div><br></div><div>Here is code down in CXTPCommandBar::OnToolHitTest:</div><div><br></div><div>&nbsp;&nbsp;&nbsp; CString strTip = pControl-&gt;GetTooltip();<br>&nbsp;&nbsp; &nbsp;if (strTip.GetLength() == 0)<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; return -1;<br></div><div><br></div><div>It gets past that test and CXTPToolTipContext::FillInToolInfo is called. Then the stack unwinds to CXTPToolTipContext::FilterToolTipMessageHelper TTM_ADDTOOL is NOT called because nHit is -1. But, m_lastInfo is set to tiHit. Then we move onto a menu entry that is not a submenu and with an ID that is not -1. The FilterToolTipMessageHelper drops into the code that sends the TTM_ADDTOOL and the TTM_DELTOOL messages and in DelTool "lpToolInfo-&gt;uID and m_nToolTipBeingShownUid are both -1 and that causes the code to post TTM_DELTOOL again.</div><div><br></div><div>I'm thinking ... DelTool should never post that message when the uId is -1 since it never posts TTM_ADDTOOL when it is -1.<br></div>]]>
   </description>
   <pubDate>Thu, 16 Sep 2021 16:03:36 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24210&amp;PID=78239&amp;title=lockup-in-trackpopupmenu#78239</guid>
  </item> 
 </channel>
</rss>