I have tried the above code to display a balloon tooltip when my mouse is over the picture control but it doesn't show me anything at all. Could you help me ?PHP Code:void CMyToolTip::InitToolTip(HWND hParentWnd)
{
if(m_toolTip.m_hWnd)
{
m_toolTip.Create(CWnd::FromHandle(hParentWnd),WS_POPUP|TTS_BALLOON);
m_toolTip.Activate(FALSE);
}
}
void CMyToolTip::SetToolTipText(LPCTSTR lpToolTipTxt, HWND hParentWnd, BOOL bActivate)
{
if(NULL==lpToolTipTxt) return;
InitToolTip(hParentWnd);
if(0==m_toolTip.GetToolCount())
{
CRect rcPic;
::GetClientRect(hParentWnd,&rcPic);
m_toolTip.AddTool(CWnd::FromHandle(hParentWnd), lpToolTipTxt, &rcPic,1);
}
m_toolTip.Activate(bActivate);
m_toolTip.UpdateTipText(lpToolTipTxt,CWnd::FromHandle(hParentWnd),1);
}
Thanks




Reply With Quote