you can you use it in any window and any place , show ToolTip information in any time. just it's simple, but for you any customized.
when I wrote the code , my project will delay in each component can show tips(so common, segment Number etc.), so I search tooltip in "codeproject" , but nothing is useful. I still discover some code and use it .
Using the code
how to using C_ColorToolTip in your project?
step 1: Declare the C_colorTooltip object in CView.
step 2: Create the C_ColorTooltip object
if (CView::OnCreate(lpCreateStruct) == -1)
BOOL bRet = m_Tips.Create(CSize(200, 20));
return bRet ? 0 : -1;
step 3 : Show tooltip in any time, any place
CColrView::OnMouseMove(UINT nFlags, CPoint point)
CPoint ptLog = point;
strTemp.Format("Mouse Pos: X = %d Y = %d ", point.x, point.y);
m_Tips.ShowTips(ptLog.x + 5, ptLog.y + 25, strTemp);
Note: Hide tooltip you call HideTips(), the method can hide Tips window.
Points of Interest
while I writting the code , C_tooltipctrl is not useful in my project. so wrote it just for my project . but it can using easily in any MFC project.
update source code 2007 09 18