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. Combo Box with Tooltip

Combo Box with Tooltip

Scheduled Pinned Locked Moved C / C++ / MFC
question
3 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.
  • J Offline
    J Offline
    John Clump
    wrote on last edited by
    #1

    Hi everyone. Is there existing source code, or perhaps someone could explain to me how, to allow a tooltip to pop up over a combo box when the user puts the mouse over the combo box? MS Word does this when the user puts the ouse cursor over the font size combo box on one of the control toolbars. I have a font size combobox on a control bar, and I want the tooltip to pop up when the user puts the mouse over it. Thanks in advance!

    M S 2 Replies Last reply
    0
    • J John Clump

      Hi everyone. Is there existing source code, or perhaps someone could explain to me how, to allow a tooltip to pop up over a combo box when the user puts the mouse over the combo box? MS Word does this when the user puts the ouse cursor over the font size combo box on one of the control toolbars. I have a font size combobox on a control bar, and I want the tooltip to pop up when the user puts the mouse over it. Thanks in advance!

      M Offline
      M Offline
      Mazdak
      wrote on last edited by
      #2

      In CP there is article about List box with tooltip support,check it,they are the same. You have to subclass,from CComboBox and ovverride some functions that you can see in that aticle. Mazy "So,so you think you can tell, Heaven from Hell, Blue skies from pain,... How I wish,how I wish you were here."
      Wish You Were Here-Pink Floyd-1975

      1 Reply Last reply
      0
      • J John Clump

        Hi everyone. Is there existing source code, or perhaps someone could explain to me how, to allow a tooltip to pop up over a combo box when the user puts the mouse over the combo box? MS Word does this when the user puts the ouse cursor over the font size combo box on one of the control toolbars. I have a font size combobox on a control bar, and I want the tooltip to pop up when the user puts the mouse over it. Thanks in advance!

        S Offline
        S Offline
        Shog9 0
        wrote on last edited by
        #3

        This is the technique i use (this is probably an MFC-only technique):

        1. Create the toolbar with a placeholder button at the position you want the combo box to be.
        2. Give the placeholder button the same ID as the combo box.
        3. Enter a description for the placeholder button. Put a newline within the description; all text after the newline will be the tooltip.
        4. After the toolbar is created, modify the placeholder button to be as wide as you wish the combo box to be, and make it a separator.
        5. Make the combo box a child of the toolbar, give it the same ID and position as the placeholder button (the ID bit is critical to having it work).
        6. Set the owner of the combo box to be the window you wish to recieve combo box messages.

        If the toolbar is in a CFrameWnd-derived window, you should be good to go. If not, you'll have to do a little extra work to handle tooltip notification messages, but otherwise it's pretty much the same. good luck! farewell goodnight last one out turn out the lights

        Smashing Pumpkins, Tales of a Scorched Earth

        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