Solved

Tool Tips In Form Views

Posted on 1998-03-03
3
600 Views
Last Modified: 2013-11-20
I have an app that uses a form view that contains buttons. I would like to provide tool tips for these buttons. This functionality it not wired in to the view class (it is in CFrameWnd derived classes). The online help outlines a procedure to accomplish this.
1. Call EnableToolTips(TRUE) in OnInitialUpdate
2. Provide a string resource for each control that needs a tooltip with the same ID as the control using the form "Status bar text\nTool tip text"
3. Handle the TTN_NEEDTEXT notification handler in the form view derived class.

No problem. They even give source code for this. I actually did this with and had it working, but noticed it hasn't since I moved to VC++ 5.0 The handler for the TTN_NEEDTEXT messages isn't even getting called and the messages aren't being generated.

Is there something I am missing? I noticed the TTN_NEEDTEXT has been superceeded by TTN_GETDISPINFO, but they are defined as the same thing anyway. Is there an easy way to do this without actually manually doing it through the CToolTipCtrl class? How can I implement tool tips in my CFormView derived classes?
0
Comment
Question by:JagerM
[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
3 Comments
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 100 total points
ID: 1316720
Did you get the latest service pack for Visual C++? It fixes a tooltip problem related to the size of a structure.

If you don't have the latest service pack, look on http://www.microsoft.com/ to get it.
0
 
LVL 4

Expert Comment

by:jtwine100697
ID: 1316721
  The way I did it was to add a CToolTipCtrl member to the View, and then use CToolTipCtrl::AddTool(...) to add controls to it, and finally use CToolTipCtrl::Activate(...) to turn tooltips on and off.

   That is a lot easier than writing your own TTN_NEEDTEXT handler.

-=- James.
0
 

Author Comment

by:JagerM
ID: 1316722
Service Pack did it. Easiest 100 pts you ever got. Thanks.

I actually tried to do it with CToolTipCtrl but the bug with the stucture size must manifest with this method as well.
0

Featured Post

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

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

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

696 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