How to dynamically create tooltips? without the resource editor help.

Posted on 2000-03-05
Last Modified: 2013-11-20
I have a dynamically created toolbar with a few buttons on it,
and I want to assign a tooltip to each of these buttons in run-time! How do I do it???
B.T.W The id's of these buttons are also created in run-time so I cannot use the resource editor help...
Thanks in advance
Yoav Stahl.
Question by:ystahl
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
LVL 15

Accepted Solution

Tommy Hui earned 600 total points
ID: 2586619
Search for TTN_NEEDTEXT in the online help. Basically, you need to set up the tooltip by calling EnableToolTips(TRUE) and then respond to this message. If you search for TTN_NEEDTEXT in the online help, you will come across an article on how to do this.

Expert Comment

ID: 2586622

Dynamically means, even buttons also u have created dynamically?. Can't go for using the resource editor?. Just U can insert a toolbar give it Ur own ID, and add the buttons and then do

bar = new CToolBar;
      if (!bar->Create(this) ||
            TRACE0("Failed to create toolbar\n");
            return ;      // fail to create
      bar->SetBarStyle(bar->GetBarStyle() |


here bar is the pointer of CToolBar. Then U can set the tooltips also at the design time!!!.

Try it out.


Expert Comment

ID: 2586626

This site may help U out.


Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

724 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