CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2000
    Location
    Washington (state)
    Posts
    125

    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?

  2. #2
    Join Date
    Feb 2000
    Location
    San Diego, CA
    Posts
    10,354

    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?

  3. #3
    Join Date
    Apr 2000
    Location
    Washington (state)
    Posts
    125

    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.

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: How do I retrieve the tooltip text for a particular button in a toolbar?

    Quote Originally Posted by sford View Post
    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'
    Victor Nijegorodov

  5. #5
    Join Date
    Apr 2000
    Location
    Washington (state)
    Posts
    125

    Re: How do I retrieve the tooltip text for a particular button in a toolbar?

    Thanks!!! That worked perfectly!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured