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

Technology Partners: 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

Suggested Solutions

Title # Comments Views Activity
Replacement selected text 2 69
Excel Use VBA to get user's Mac Address for their computer 5 407
Detect file exist or not 3 215
Work with App store 7 121
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

732 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