December 6th, 2008, 05:08 AM
Tooltips on CWnd Derived Class
I've created a basic MFC application that contains the following classes:
* ToolTipDemoApp (derived from CWinApp)
* ToolTipDemoFrame (derived from CWndFrame)
* Canvas (Derived from CWnd)
This application is a test application so I can better understand the confusing mess that are tooltips in MFC. All I want it to do is display a tooltip when the mouse hovers over the Canvas.
The problem I have is that OnToolHitTest in the Canvas class is never called. I've enabled tooltips in Canvas::OnCreate. I also have a handler for TTN_NEEDTEXT, but since the hit test function is never called it hasn't got that far yet (not that the MSDN documentation says I need the OnToolHitTest function anyway).
The code (for the next month) can be found at: www.pastebin.com/m63942e7a
Tags for this Thread
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!