We help IT Professionals succeed at work.

Check out this week's podcast, "Dairy Farms to Databases: Community's Hand in Technology"Listen Now

x

Tool Tips for windows in a CToolbar

Vance Kessler
on
433 Views
Last Modified: 2013-11-20
I have an application that uses SetButtonInfo() to add buttons to the end of a CToolbar.  I then create owner drawn buttons (sub-classed off CButton) as child windows of that toolbar.

The problem is that the tool tips aren't being displayed for these new buttons.  This worked perfectly in versions prior to Visual C++ 5.0.  I simply overrode OnNotify() and looked for the TTN_NEEDTEXT message (in my sub-class of CToolBar).  But now, I don't get this message for my new buttons.

Oh, another thing is that I need to provide the text for the tool tips dynamically, as they depend on user input (they can't come from the resource file).
Comment
Watch Question

Commented:
Have you allocated ID numbers to the new buttons?

Are they enabled/active?

Author

Commented:
Yes, they all have IDs and are enabled.  As I said earlier they worked perfectly before Visual C++ 5.0 came out.  Now the only thing that doesn't work are the tool tips.
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
Thanks, That is just what I needed.

Commented:
Hi! If my answer is good enough for you, then I would appriciate if you would accept answer and award points
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.