<?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 : CXTTipWindow</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : CXTTipWindow]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 19 Apr 2026 17:45:13 +0000</pubDate>
  <lastBuildDate>Fri, 06 Feb 2004 08:00:26 +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=304</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[CXTTipWindow : Noticed a bug in CXTTipWindow...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=304&amp;PID=976&amp;title=cxttipwindow#976</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=350">vladsch</a><br /><strong>Subject:</strong> 304<br /><strong>Posted:</strong> 06 February 2004 at 8:00am<br /><br /><P>Noticed a bug in CXTTipWindow that does not display the drop shadow if delayed display&nbsp;is selected. I copied the SetWindow... line from OnTimer which has the bug. change that line in CXTTipWindowNotify::OnTimer&nbsp;to:</P><P><table width="99%"><tr><td><pre class="BBcode">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SetWindowPos(&amp;wndTop, m_rcScreenWindow.left, m_rcScreenWindow.top, m_rcShadow.right - m_rcWindow.left,<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; m_rcShadow.bottom - m_rcWindow.top, SWP_SHOWWINDOW|SWP_NOACTIVATE);<BR></pre></td></tr></table></P>]]>
   </description>
   <pubDate>Fri, 06 Feb 2004 08:00:26 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=304&amp;PID=976&amp;title=cxttipwindow#976</guid>
  </item> 
  <item>
   <title><![CDATA[CXTTipWindow : Hi Giovanni: If you are interested...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=304&amp;PID=971&amp;title=cxttipwindow#971</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=350">vladsch</a><br /><strong>Subject:</strong> 304<br /><strong>Posted:</strong> 05 February 2004 at 9:30pm<br /><br /><P>Hi Giovanni:</P><P>If you are interested here is the code for a derivative of CXTTipWindow that will make sure the popup fully displays (provided it is not too big to fit) on the screen. In cases where there is more than one monitor then the tip will display on the same monitor that contains the mouse pointer. Actually, I found that this is the only way to make the tip show up at all.</P><P>Ignore the class name, I pulled the code from a class that has many more mods including Notifications to parent to allow updating of&nbsp;the tooltip text just before displaying the tip. Hence the suffix Notify. </P><P>Header File</P><P><table width="99%"><tr><td><pre class="BBcode"><BR>class _XT_EXT_CLASS CXTTipWindowNotify : public CXTTipWindow<BR>{<BR>public:</P><P>&nbsp;&nbsp;&nbsp; // Summary: Constructs a CXTTipWindowNotify object<BR>&nbsp;&nbsp;&nbsp; CXTTipWindowNotify() { };</P><P>&nbsp;&nbsp;&nbsp; // Summary: Destroys a CXTTipWindowNotify object, handles cleanup and de-allocation<BR>&nbsp;&nbsp;&nbsp; virtual ~CXTTipWindowNotify() { };<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; // Summary: Call this member function to hide the tip window<BR>&nbsp;&nbsp;&nbsp; virtual BOOL ShowTipWindow(const CPoint&amp; point, DWORD dwTipStyle=TWS_XT_DROPSHADOW, UINT nDelay=0, UINT nElapse=5000, BOOL bCenterHorz = FALSE);<BR>};<BR></pre></td></tr></table></P><P><BR>CPP File<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR><table width="99%"><tr><td><pre class="BBcode"><BR>BOOL CXTTipWindowNotify::ShowTipWindow(const CPoint&amp; point, DWORD dwTipStyle, UINT nDelay, UINT nElapse, BOOL bCenterHorz)<BR>{<BR>&nbsp;&nbsp;&nbsp; BOOL bRetVal = CXTTipWindow::ShowTipWindow(point, dwTipStyle, nDelay, nElapse, bCenterHorz);</P><P>&nbsp;&nbsp;&nbsp; if (bRetVal)<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CRect rc;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CRect rc2;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CPoint pt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GetCursorPos(&amp;pt);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HMONITOR hMon = MonitorFromPoint(pt, MONITOR_DEFAULTTONEAREST);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MONITORINFO monInfo;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bool bChanged = false;</P><P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; monInfo.cbSize = sizeof(monInfo);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (hMon &amp;&amp; GetMonitorInfo(hMon, &amp;monInfo))<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; rc = monInfo.rcMonitor;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; // can't get mon info, just use desktop<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; ::GetClientRect(::GetDesktopWindow(), &amp;rc);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</P><P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; InitializeSize(m_ptMousePos, m_bCenterHorz); //Calculates m_rcScreenWindow values<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rc2 = m_rcScreenWindow;</P><P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (rc2.left &lt; rc.left)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; // move right<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; int nDelta = rc.left - rc2.left;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; m_ptMousePos.x += nDelta;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; m_rectTipArea.right -= nDelta;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; bChanged = true;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else if (rc2.right &gt; rc.right)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; // move left<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; int nDelta = rc2.right - rc.right;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; m_ptMousePos.x -= nDelta;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; m_rectTipArea.left += nDelta;</P><P> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; // this is needed to make the tooltip hide as soon as you cross over the monitor boundary<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; if (m_rectTipArea.right+m_ptMousePos.x &gt; rc.right) m_rectTipArea.right = rc.right - m_ptMousePos.x;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; bChanged = true;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</P><P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!nDelay &amp;&amp; bChanged)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; // lets move the tip it is already displayed<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; InitializeSize(m_ptMousePos, m_bCenterHorz); //Calculates m_rcScreenWindow values<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; SetWindowPos(&amp;wndTop, m_rcScreenWindow.left, m_rcScreenWindow.top, m_rcScreenWindow.Width(), m_rcScreenWindow.Height(), SWP_SHOWWINDOW|SWP_NOACTIVATE);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; return bRetVal;<BR>}<BR></pre></td></tr></table><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR></P>]]>
   </description>
   <pubDate>Thu, 05 Feb 2004 21:30:55 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=304&amp;PID=971&amp;title=cxttipwindow#971</guid>
  </item> 
  <item>
   <title><![CDATA[CXTTipWindow : Hello, I start to use your CXTTipWindow...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=304&amp;PID=682&amp;title=cxttipwindow#682</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=201">Karnize</a><br /><strong>Subject:</strong> 304<br /><strong>Posted:</strong> 17 December 2003 at 8:04am<br /><br /><P>Hello,</P><P>I start to use your CXTTipWindow to display tooltips in my program and found some constraints. If tooltip popups near the screen border it can partly goes outside the screen, but standard Windows tooltips always shown entirely. The same problem with Windows taskbar.</P><P>There is no possibility to calculate the rect of the tooltip before it will be showed so there is no possibility to solve this problem in my sources.</P><P>It will be very good if CXTTipWindow modify the point there it will be displayed to fit the screen or you add the function to calculate the tooltip rect before show the tooltip.</P>]]>
   </description>
   <pubDate>Wed, 17 Dec 2003 08:04:21 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=304&amp;PID=682&amp;title=cxttipwindow#682</guid>
  </item> 
 </channel>
</rss>