Solved

Tool Tips In Form Views

Posted on 1998-03-03
3
595 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
Comment Utility
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
Comment Utility
  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
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

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: 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.
This video discusses moving either the default database or any database to a new volume.

771 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

9 Experts available now in Live!

Get 1:1 Help Now