How do I retrieve the tooltip text for a particular button in a toolbar?
How do I retrieve the tooltip text for a particular button in a toolbar?
Re: How do I retrieve the tooltip text for a particular button in a toolbar?
as far as I know, the tooltip text is something the application implements itself and has no native support by the toolbar control itself.
Is yours a SDI/MDI type of application that hosts a toolbar?
Also, what is the reason you are interested in this information? Perhaps there are other ways of gettign to the same information?
Re: How do I retrieve the tooltip text for a particular button in a toolbar?
It is an MDI application...
I am building a context menu where each item in the menu represents a button on the toolbar. I use this menu to hide or reveal buttons on the toolbar (for configurable toolbars). I can retrieve the text from the main menu for the function having the same ID but I was hoping to use the button tooltip so this function would ONLY be reliant on the toolbar itself.
Re: How do I retrieve the tooltip text for a particular button in a toolbar?
Quote:
Originally Posted by
sford
How do I retrieve the tooltip text for a particular button in a toolbar?
You can only retrieve it if you have set it. And if you have set it then the tooltip text is the "second" part (after the '\n' delimiter) in the string resource with the toolbar button ID.
So load this string (CString:.LoadString) and extract the part after '\n'
Re: How do I retrieve the tooltip text for a particular button in a toolbar?
Thanks!!! That worked perfectly!