<?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 : Tooltip in Treecontrol</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Tooltip in Treecontrol]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 21 Apr 2026 02:51:16 +0000</pubDate>
  <lastBuildDate>Wed, 27 Oct 2010 04:20: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=17489</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[Tooltip in Treecontrol : Ok it works now :-)Changed the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17489&amp;PID=61180&amp;title=tooltip-in-treecontrol#61180</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=365">Alex H.</a><br /><strong>Subject:</strong> 17489<br /><strong>Posted:</strong> 27 October 2010 at 4:20am<br /><br />Ok it works now :-)<br><br>Changed the code in on ToolHitTest<br><br>...<br>&nbsp;HTREEITEM hTreeItem = HitTest(point, &amp;nFlags);&nbsp; // GetItemFromPoint(point);<br>&nbsp;if(pTI &amp;&amp; hTreeItem)<br>&nbsp;{<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; nHit = reinterpret_cast&lt;INT_PTR&gt;(hTreeItem);<br><br>...<br><br>Once again - thank you for your help!<br>]]>
   </description>
   <pubDate>Wed, 27 Oct 2010 04:20:09 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17489&amp;PID=61180&amp;title=tooltip-in-treecontrol#61180</guid>
  </item> 
  <item>
   <title><![CDATA[Tooltip in Treecontrol : Thank you for your help but it...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17489&amp;PID=61176&amp;title=tooltip-in-treecontrol#61176</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=365">Alex H.</a><br /><strong>Subject:</strong> 17489<br /><strong>Posted:</strong> 27 October 2010 at 3:37am<br /><br />Thank you for your help but it doesn't work -&gt; any idea?<br>I use toolkit version 13.4. My class is derived form CUIXTreeCtrl which is based on CXTTreeCtrl.<br><br>here is my code:<br><br>//-----------------------------------------------------------------------------<br>int CUIActiveUsersTreeCtrl::<b>OnCreate</b>(LPCREATESTRUCT lpCreateStruct)<br>//-----------------------------------------------------------------------------<br>{<br>&nbsp;&nbsp;&nbsp; if (CUIXTreeCtrl::OnCreate(lpCreateStruct) == -1)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return -1;<br><br>&nbsp;&nbsp;&nbsp; // Create the image list used by the tree control.<br>&nbsp;&nbsp;&nbsp; if ( !m_imageList.Create( 16, 16, ILC_COLOR24 | ILC_MASK, 1, 1 ) )<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; TRACE0("Failed to create image list.\n");<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return -1;<br>&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp; // load the tree images bitmap and add it to the image list.<br>&nbsp;&nbsp;&nbsp; m_bitmap.LoadBitmap( IDB_IMGLIST_VIEW );<br>&nbsp;&nbsp;&nbsp; m_imageList.Add(&amp;m_bitmap, RGB(255,0,255));&nbsp;&nbsp; <br><br>&nbsp;&nbsp;&nbsp; // Set the image list for the tree control.<br>&nbsp;&nbsp;&nbsp; SetImageList( &amp;m_imageList, TVSIL_NORMAL );<br><br>&nbsp;&nbsp;&nbsp;<b> m_TTContext.SetStyle(xtpToolTipMarkup);<br>&nbsp;&nbsp;&nbsp; m_TTContext.ShowTitleAndDescription(TRUE);<br>&nbsp;&nbsp;&nbsp; SetToolTips(NULL);</b><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; return 0;<br>}<br><br>BOOL CUIActiveUsersTreeCtrl::<b>PreCreateWindow</b>(CREATESTRUCT&amp; cs)<br>{<br>&nbsp;&nbsp;&nbsp; if ( !CUIXTreeCtrl::PreCreateWindow( cs ) )<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return FALSE;<br><br>&nbsp;&nbsp;&nbsp; // Set the style for the tree control.&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; cs.style |= TVS_DISABLEDRAGDROP;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; cs.style &amp;= ~TVS_HASLINES;<br>&nbsp;&nbsp;&nbsp; cs.style &amp;= ~TVS_LINESATROOT;<br>&nbsp;&nbsp;&nbsp; cs.style &amp;= ~TVS_HASBUTTONS;<br><br>&nbsp;&nbsp;&nbsp; // If non-xp mode, add a client edge border to the tree.<br>&nbsp;&nbsp;&nbsp; if (!xtAfxData.bXPMode)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; cs.dwExStyle |= WS_EX_CLIENTEDGE;<br>&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp;<b> cs.style |= TVS_NOTOOLTIPS;</b><br><br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return TRUE;<br>}<br><br>CString CreateMarkupTool(LPCTSTR strCaption, LPCTSTR strDesc)<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; CString strHTML;<br>&nbsp;&nbsp;&nbsp; strHTML.Format(<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; _T("&lt;StackPanel Margin='1' MaxWidth='200'&gt;")<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; _T("&lt;TextBlock Padding='1, 3, 1, 3' FontWeight='Bold'&gt;%s&lt;/TextBlock&gt;")<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; _T("&lt;TextBlock Padding='9, 6, 30, 7' TextWrapping='Wrap'&gt;%s&lt;/TextBlock&gt;")<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; _T("&lt;Border Height='1' Background='#9ebbdd' /&gt;")<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; _T("&lt;Border Height='1' Background='White' /&gt;")&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; _T("&lt;/StackPanel&gt;"),<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; strCaption, strDesc);<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; return strHTML;<br>}<br><br>INT_PTR CUIActiveUsersTreeCtrl::<b>OnToolHitTest</b>(CPoint point, TOOLINFO* pTI) const<br>{<br>&nbsp;&nbsp;&nbsp; // check child windows first by calling CControlBar<br>&nbsp;&nbsp;&nbsp; INT_PTR nHit = CWnd::OnToolHitTest(point, pTI);<br>&nbsp;&nbsp;&nbsp; if (nHit != -1)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return nHit;<br><br>&nbsp;&nbsp;&nbsp; HTREEITEM hTreeItem = GetItemFromPoint(point); // this is yust a helper to get item under cursor<br>&nbsp;&nbsp;&nbsp; if(hTreeItem)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; nHit = (INT_PTR) hTreeItem; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; m_TTContext.FillInToolInfo(pTI, GetSafeHwnd(), CRect(point, CSize(100, 100) ), nHit, CreateMarkupTool(_T("XXX Test"), _T("YYY TEST2")));<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return nHit;<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; return -1;<br>}<br><br>void CUIActiveUsersTreeCtrl::<b>RelayEvent</b>(UINT message, WPARAM wParam, LPARAM lParam)<br>{<br>&nbsp;&nbsp;&nbsp; MSG msg;<br>&nbsp;&nbsp;&nbsp; msg.hwnd= m_hWnd;<br>&nbsp;&nbsp;&nbsp; msg.message= message;<br>&nbsp;&nbsp;&nbsp; msg.wParam= wParam;<br>&nbsp;&nbsp;&nbsp; msg.lParam= lParam;<br>&nbsp;&nbsp;&nbsp; POINT pt;<br>&nbsp;&nbsp;&nbsp; pt.x = LOWORD (lParam);<br>&nbsp;&nbsp;&nbsp; pt.y = HIWORD (lParam);<br><br>&nbsp;&nbsp;&nbsp; ClientToScreen(&amp;pt);<br><br>&nbsp;&nbsp;&nbsp; msg.time= clock();<br><br>&nbsp;&nbsp;&nbsp; msg.pt.x= pt.x;<br><br>&nbsp;&nbsp;&nbsp; msg.pt.y= pt.y;<br><br>&nbsp;&nbsp;&nbsp; m_TTContext.FilterToolTipMessage(this, &amp;msg);<br>}<br><br>BOOL CUIActiveUsersTreeCtrl::<b>OnWndMsg</b>(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pResult)<br>{<br>&nbsp;&nbsp;&nbsp; //m_TTContext.FilterToolTipMessage(this, message, wParam, lParam);<br>&nbsp;&nbsp;&nbsp; if (message == WM_MOUSEMOVE)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; RelayEvent(message, wParam, lParam);<br><br>&nbsp;&nbsp;&nbsp; return CUIXTreeCtrl::OnWndMsg(message, wParam, lParam, pResult);<br>}<br><br><br>]]>
   </description>
   <pubDate>Wed, 27 Oct 2010 03:37:43 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17489&amp;PID=61176&amp;title=tooltip-in-treecontrol#61176</guid>
  </item> 
  <item>
   <title><![CDATA[Tooltip in Treecontrol : http://forum.codejock.com/forum_posts.asp?TID=9133...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17489&amp;PID=61168&amp;title=tooltip-in-treecontrol#61168</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2198">znakeeye</a><br /><strong>Subject:</strong> 17489<br /><strong>Posted:</strong> 26 October 2010 at 11:29am<br /><br /><a href="http://forum.codejock.com/forum_posts.asp?TID=9133" target="_blank">http://forum.codejock.com/forum_posts.asp?TID=9133</A>]]>
   </description>
   <pubDate>Tue, 26 Oct 2010 11:29:13 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17489&amp;PID=61168&amp;title=tooltip-in-treecontrol#61168</guid>
  </item> 
  <item>
   <title><![CDATA[Tooltip in Treecontrol : How can i add an individual tooltip...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17489&amp;PID=61167&amp;title=tooltip-in-treecontrol#61167</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=365">Alex H.</a><br /><strong>Subject:</strong> 17489<br /><strong>Posted:</strong> 26 October 2010 at 10:15am<br /><br />How can i add an <b>individual tooltip</b> to each tree control?<br>It would be nice if this tooltip could be of type <b>xtpToolTipMarkup</b>!<br><br>Please help!<br>]]>
   </description>
   <pubDate>Tue, 26 Oct 2010 10:15:18 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17489&amp;PID=61167&amp;title=tooltip-in-treecontrol#61167</guid>
  </item> 
 </channel>
</rss>