Solved

Tool Tips In Form Views

Posted on 1998-03-03
3
598 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
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how do i create updater to My Activex application? 3 94
List out all word 7 317
haveThree challenge 22 121
Authenticate using sesu from script 7 56
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…
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.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

856 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