Solved

ToolTip

Posted on 2001-06-19
5
488 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
sameEnds challenge 3 133
changeXy challenge 13 67
Can not remove SSL certificate on iPhone 6 - iOS10.2 12 232
Message not shown 5 27
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

932 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now