Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1061
  • Last Modified:

CToolTip and CListCtrl

I am implementing tooltips for a CListCCtrl derived class

BOOL CMyListCtrl::OnToolTipText( UINT id, NMHDR * pNMHDR, LRESULT * pResult )
{
     TOOLTIPTEXTA* pTTTA = (TOOLTIPTEXTA*)pNMHDR;
     TOOLTIPTEXTW* pTTTW = (TOOLTIPTEXTW*)pNMHDR;
     CString strTipText;
     UINT nID = pNMHDR->idFrom;

     if( nID == 0 )// Notification in NT from automatically
       return FALSE;        // created tooltip

  I have done everything I think but nID is always false

  I do handle OnToolHitTest and set the id of the row by hittesting. I do call enable tootips in PreSubClassWindow.

 Anyone know why nID would always be Zero?


 
0
williamcampbell
Asked:
williamcampbell
1 Solution
 
Roshan DavisCommented:
Please look at this link

"CToolTipListCtrl - A CListCtrl derived class providing per SubItem tooltips"

http://www.codeproject.com/listctrl/ctooltiplistctrl.asp

Good Luck
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now