Solved

Tool Tips In Form Views

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MFC Dialog 9 49
Strange date stored 22 120
Adapt this command to show who installed 29 108
java ^ examples 8 65
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
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.

776 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