<?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 : Strange tooltip behaviour?!</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : Strange tooltip behaviour?!]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 04 Apr 2026 11:17:51 +0000</pubDate>
  <lastBuildDate>Wed, 11 Jul 2012 09:58:25 +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=19946</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[Strange tooltip behaviour?! : Hi;I&amp;#039;m using a report control...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19946&amp;PID=68595&amp;title=strange-tooltip-behaviour#68595</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=109">mgampi</a><br /><strong>Subject:</strong> 19946<br /><strong>Posted:</strong> 11 July 2012 at 9:58am<br /><br />Hi;<br><br>I'm using a report control inside a dialog that is shown as a custom popup in ribbon control.<br>When the user opens a combo drop down listbox some dialog buttons are hidden by this listbox. When the mouse cursor is moved over the area of the hidden button behind the lisbox (the area is currently occupied by the listbox), the tooltip of this button appears in front of the shown combo listbox.<br>What's going on here? I can't find out how to stop the tooltip from showing, while the combo listbox is shown.<br><br>To see the problem take a look at the screenshot below:<br><br><img src="uploads/109/Tooltip_&#111;n_popup_dialog.png" height="495" width="667" border="0" /><br><br>I use this code inside the dialog class to bring up the tooltips:<br><br><table width="99%"><tr><td><pre class="BBcode">INT_PTR CReportConditionDlg::OnToolHitTest( CPoint point, TOOLINFO* pTI ) const {<br>&nbsp;&nbsp;&nbsp; HWND hWndChild = NULL;<br>&nbsp;&nbsp;&nbsp; ::ClientToScreen(m_hWnd, &amp;point);<br>&nbsp;&nbsp;&nbsp; HWND hChild = ::GetWindow(m_hWnd, GW_CHILD);<br>&nbsp;&nbsp;&nbsp; for (; hChild != NULL; hChild = ::GetWindow(hChild, GW_HWNDNEXT))<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if ((UINT)(WORD)::GetDlgCtrlID(hChild) != (WORD)-1 &amp;&amp;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (::GetWindowLong(hChild, GWL_STYLE) &amp; WS_VISIBLE))<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CRect rect;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ::GetWindowRect(hChild, rect);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (rect.PtInRect(point))<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; hWndChild = hChild;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; break;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp; if (hWndChild != NULL &amp;&amp; ::IsWindowEnabled(hWndChild))<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // return positive hit if control ID isn't -1<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; INT_PTR nHit = (UINT)(WORD)::GetDlgCtrlID(hWndChild);<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // hits against child windows always center the tip<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (pTI != NULL &amp;&amp; pTI-&gt;cbSize &gt;= sizeof(XTP_TOOLTIP_TOOLINFO))<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CString Tooltip;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (Tooltip.LoadString(static_cast&lt;UINT&gt;(nHit)) &amp;&amp; !Tooltip.IsEmpty()) {<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CString Caption, Description;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; AfxExtractSubString(Caption, Tooltip, 0, L'\n');<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; AfxExtractSubString(Description, Tooltip, 1, L'\n');<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CXTPEmptyRect rect;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CXTPToolTipContext::FillInToolInfo(pTI, m_hWnd, rect, reinterpret_cast&lt;INT_PTR&gt;(hWndChild), Caption, Caption, Description, &amp;Images_);<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pTI-&gt;uFlags|=TTF_IDISHWND;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (!(::SendMessage(hWndChild, WM_GETDLGCODE, 0, 0) &amp; DLGC_BUTTON))<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pTI-&gt;uFlags |= TTF_NOTBUTTON|TTF_CENTERTIP;<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return nHit;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; return -1;&nbsp; // not found<br>}</pre></td></tr></table><br><br>Any help is welcome!<br>]]>
   </description>
   <pubDate>Wed, 11 Jul 2012 09:58:25 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19946&amp;PID=68595&amp;title=strange-tooltip-behaviour#68595</guid>
  </item> 
 </channel>
</rss>