• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 574
  • Last Modified:

ToolTip

Hi I wanna cal a ToolTip from my OnMouseMove.. When the mouse is over a pos(x,y) in a HWnd, then I want a ToolTip to pop up..

I don't want to attach the ToolTip Control to a ID.. Just want a function that cals a tooltip.

How is that done ?
0
win32
Asked:
win32
  • 2
  • 2
1 Solution
 
Meir RivkinFull stack Software EngineerCommented:
post your e-mail and i'll send it to u
0
 
win32Author Commented:
email:
cb_priv@hotmail.com
0
 
Meir RivkinFull stack Software EngineerCommented:
post your e-mail and i'll send it to u
0
 
win32Author Commented:
It works the first time, but the ToolTip, only shows 1 time.. If you move the curser, then a new tooltip should pop up at the new curser position..

Why does, the tip not pop up at the new possition of the curser, and how is it done ?

CB.
0
 
migelCommented:
Hi!
for example
void CMyWnd::OnMouseMove(UINT nFlags, CPoint point)
{
    //tooltips
static int  tipCount -= 1;
    if (tipCount<=0)
    {
     tooltip.Activate(TRUE)
     {
         CString str;
         //GetToolTipString(point, str);
         tooltip.UpdateTipText(str, this);
     };
     tipCount = 4;
    };
}

int CMyWnd::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
    if (CWnd::OnCreate(lpCreateStruct) == -1)
         return -1;
     
    CRect r;

    EnableToolTips(TRUE);
    //create tool tip object
    tooltip.Create(this);
    tooltip.Activate(TRUE);
    tooltip.AddTool(this,  (LPCTSTR)_T(""));
    tooltip.SendMessage(TTM_SETMAXTIPWIDTH, 0, SHRT_MAX);
    tooltip.SendMessage(TTM_SETDELAYTIME, TTDT_AUTOPOP, SHRT_MAX);
    tooltip.SendMessage(TTM_SETDELAYTIME, TTDT_INITIAL, 100);
    tooltip.SendMessage(TTM_SETDELAYTIME, TTDT_RESHOW, 100);

    return 0;
}

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now