Solved

ToolTip

Posted on 2001-06-19
5
525 Views
Last Modified: 2013-11-20
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
Comment
Question by:win32
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 42

Expert Comment

by:sedgwick
ID: 6205865
post your e-mail and i'll send it to u
0
 

Author Comment

by:win32
ID: 6205898
email:
cb_priv@hotmail.com
0
 
LVL 42

Expert Comment

by:sedgwick
ID: 6205931
post your e-mail and i'll send it to u
0
 

Author Comment

by:win32
ID: 6205996
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
 
LVL 12

Accepted Solution

by:
migel earned 50 total points
ID: 6206127
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Get filename and folder into excel 7 87
Define unique primary key 9 99
ffmpeg - "rtsp://...... Operation not permitted" 4 92
scoreUp challenge 14 72
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

736 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question