Displaying tooltip
-
Hi, i want to display a tooltip when the mouse pointer is over a specific part of window. I am using the following code
if(IsResizable(ptHit))
{
//CRect boundingBox;
//BOOL rval = TRUE;
if (::IsWindow(mToolTip.GetSafeHwnd()))
{
mToolTip.UpdateTipText(_T("Resizing not possible"), this, 60000);
mToolTip.Activate(TRUE);
}
else
{
BOOL rVal = TRUE;
rVal = mToolTip.Create(this, TTS_ALWAYSTIP);
if(rVal)
{
BOOL result = mToolTip.AddTool(this, _T("Resizing not possible"), CRect(100, 150, 200, 200), 60000);
if(result)
{
mToolTip.Activate(TRUE);
}
}
}
}But the tooltip is not coming. Thanks
-
Hi, i want to display a tooltip when the mouse pointer is over a specific part of window. I am using the following code
if(IsResizable(ptHit))
{
//CRect boundingBox;
//BOOL rval = TRUE;
if (::IsWindow(mToolTip.GetSafeHwnd()))
{
mToolTip.UpdateTipText(_T("Resizing not possible"), this, 60000);
mToolTip.Activate(TRUE);
}
else
{
BOOL rVal = TRUE;
rVal = mToolTip.Create(this, TTS_ALWAYSTIP);
if(rVal)
{
BOOL result = mToolTip.AddTool(this, _T("Resizing not possible"), CRect(100, 150, 200, 200), 60000);
if(result)
{
mToolTip.Activate(TRUE);
}
}
}
}But the tooltip is not coming. Thanks
Call method EnableToolTips(). Capture message TTN_NEEDTEXT. Add ON_NOTIFY_EX( TTN_NEEDTEXT, 0, OnToolTipNotify) in the message map and implement method OnToolTipNotify.
cheers Varghese Paul
-
Call method EnableToolTips(). Capture message TTN_NEEDTEXT. Add ON_NOTIFY_EX( TTN_NEEDTEXT, 0, OnToolTipNotify) in the message map and implement method OnToolTipNotify.
cheers Varghese Paul