Re: CMFCToolTipCtrl in CView
Re: CMFCToolTipCtrl in CView
Hi Victor, and thank you for your post. There is a small problem regarding this example, this one is showing the tooltip for a rectangle who is already setup during creation, and in my case the tooltip should be visible only when the mouse pointer is hovering certain rectangles inside of my control, control which is spread over entire CMyView ...
Re: CMFCToolTipCtrl in CView
Quote:
Originally Posted by
mesajflaviu
Hi Victor, and thank you for your post. There is a small problem regarding this example, this one is showing the tooltip for a rectangle who is already setup during creation, and in my case the tooltip should be visible only when the mouse pointer is hovering certain rectangles inside of my control, control which is spread over entire CMyView ...
You could update tooltip data after moving/resizing your control. Just use TTM_SETTOOLINFO message!
Re: CMFCToolTipCtrl in CView
Quote:
Originally Posted by
VictorN
You could update tooltip data after moving/resizing your control. Just use TTM_SETTOOLINFO message!
Ok, I'll try.
Re: CMFCToolTipCtrl in CView
BTW, you could use MFC class CToolTipCtrl (or CMFCToolTipCtrl) and its methods like CToolTipCtrl::AddTool, CToolTipCtrl::SetToolRect rather than directly sending TTM_... messages.
See https://docs.microsoft.com/en-us/cpp...s?view=vs-2019
Re: CMFCToolTipCtrl in CView
Yes, but that rectangles are changing dynamically, so I guess this is the long road to achieve the task ... I have in CMyCtrl a HitTest(CPoint pt) method which return me an item ID ... I guess sending TTM_ messages will be more suitable ... but I don't know if I could use CMFCToolTipCtrl with these messages (TTM_). I am studying this issue ...
Re: CMFCToolTipCtrl in CView
Quote:
Originally Posted by
VictorN
You are right, I think I can use CMFCToolTipCtrl with AddTool/SetToolRect methods ...
Thank you.
Re: CMFCToolTipCtrl in CView