Tool Tips for windows in a CToolbar
Posted on 1997-09-09
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).