Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Tool tip on a button

Tool tip on a button

Scheduled Pinned Locked Moved C / C++ / MFC
helpjsontutorialquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • _ Offline
    _ Offline
    _AnsHUMAN_
    wrote on last edited by
    #1

    Hi All, In my application I have a button with an Icon. I load the icon on the button using the LoadImage API and then SetIcon(). The button does not have it's owner draw property set to true, only it's Icon Property is set to true. When the user hovers the button with the mouse a tool tip is shown. The problem is that, the tooltip is only shown when the icon is shown in the disabled state. When the icon is in the enabled state the tooltip is seen only if the mouse is hovering on the corner of the button. Can anyone help or provide some ideas on how to show the Tooptip when the user is hovering over the button with an icon? PS: I am not allowed to subclass the button control :(. Atleast by adding a new class to the application's code base.

    Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

    J H 2 Replies Last reply
    0
    • _ _AnsHUMAN_

      Hi All, In my application I have a button with an Icon. I load the icon on the button using the LoadImage API and then SetIcon(). The button does not have it's owner draw property set to true, only it's Icon Property is set to true. When the user hovers the button with the mouse a tool tip is shown. The problem is that, the tooltip is only shown when the icon is shown in the disabled state. When the icon is in the enabled state the tooltip is seen only if the mouse is hovering on the corner of the button. Can anyone help or provide some ideas on how to show the Tooptip when the user is hovering over the button with an icon? PS: I am not allowed to subclass the button control :(. Atleast by adding a new class to the application's code base.

      Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

      J Offline
      J Offline
      James R Twine
      wrote on last edited by
      #2

      This does not sound like standard button behavior to me.  I would be interested to know how the tooltips are implemented.  Is the tooltip control having events passed to it, or is it hooking/subclassing the button control itself (TTF_SUBCLASS)?    I have done icon buttons like this many times with tooltips and never had a problem like you are describing, other than when the button is disabled, the tooltip is not normally shown.  So I think some special tooltip handling is being done which is broken.    Peace!

      -=- James
      Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
      Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
      See DeleteFXPFiles

      _ 1 Reply Last reply
      0
      • _ _AnsHUMAN_

        Hi All, In my application I have a button with an Icon. I load the icon on the button using the LoadImage API and then SetIcon(). The button does not have it's owner draw property set to true, only it's Icon Property is set to true. When the user hovers the button with the mouse a tool tip is shown. The problem is that, the tooltip is only shown when the icon is shown in the disabled state. When the icon is in the enabled state the tooltip is seen only if the mouse is hovering on the corner of the button. Can anyone help or provide some ideas on how to show the Tooptip when the user is hovering over the button with an icon? PS: I am not allowed to subclass the button control :(. Atleast by adding a new class to the application's code base.

        Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

        H Offline
        H Offline
        Hamid Taebi
        wrote on last edited by
        #3

        See this[^] thread does helpful?


        WhiteSky


        1 Reply Last reply
        0
        • J James R Twine

          This does not sound like standard button behavior to me.  I would be interested to know how the tooltips are implemented.  Is the tooltip control having events passed to it, or is it hooking/subclassing the button control itself (TTF_SUBCLASS)?    I have done icon buttons like this many times with tooltips and never had a problem like you are describing, other than when the button is disabled, the tooltip is not normally shown.  So I think some special tooltip handling is being done which is broken.    Peace!

          -=- James
          Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
          Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
          See DeleteFXPFiles

          _ Offline
          _ Offline
          _AnsHUMAN_
          wrote on last edited by
          #4

          The tool tips are being implemented by passing the events.

          Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups