Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Display a tool-tip!!!

Posted on 1999-10-06
Medium Priority
Last Modified: 2013-11-20
Dear All,

I want to know how to display a tooltip when I have moved the mouse over a button.
The button control is placed at the dialog.....and this dialog will be used at the CFormView class......

How can I impelemnt a tooltip in this suitation?

Question by:ee_lcpaa
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
  • 2

Accepted Solution

VCGuru earned 150 total points
ID: 2102740
class CMyFormView:public CFormView
CButton m_button;
//use class wizard to add m_button
CToolTipCtrl m_ToolTip;

in the .cpp
Override PreTranslateMessage

BOOL CMyFormView::PreTranslateMessage(...)
return CFormView::PreTranslate...

void CMyFormView::OnInitialUpdate()
//where IDC_BUTTON is the ID of the button


That's it.

Expert Comment

ID: 2102751
oops messed up...
In the above answer IDC_BUTTON is NOT THE ID of the button.

What you have to do is use the resource editor to define string resources for each control. If my button needs a tooltip "MyButton" then IDS_MYTOOL would be defined as "MyButton". The AddTool function in the above answer would be.

m_ToolTip.AddTool(&m_button,IDS_MYTOOL );

Sorry for the inconvinience

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA:…

721 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