#227 Error in atlctrls.h, class CToolTipCtrlT

v1.0 (example)
closed-wont-fix
None
5
2014-03-20
2010-02-16
Anonymous
No

WTL Version 8.1 (build 9127) 5/7/09
On line 2456 in atlctrls.h the code is:
CToolInfo ti(0, hWnd, nIDTool, (LPRECT)lpRectTool, (LPTSTR)text.m_lpstr);
the correct code (I think) is this:
CToolInfo ti(TTF_SUBCLASS, hWnd, nIDTool, (LPRECT)lpRectTool, (LPTSTR)text.m_lpstr);

Without the correction the tooltip control does not work!

Discussion

  • That is not correct - tooltip will work if you forward mouse messages to it using CToolTipCtrl::RelayEvent(). If you don'r want to do that and want tooltip to subclass the window, you can use CToolTipCtrl::AddTool((LPTOOLINFO lpToolInfo).

     


Anonymous


Cancel   Add attachments