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. I removed default hover behavior in my toolbar. Can I get it back?

I removed default hover behavior in my toolbar. Can I get it back?

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
5 Posts 2 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.
  • M Offline
    M Offline
    maxmaven
    wrote on last edited by
    #1

    Hi, I have a CToolbar and somehow managed to cause the buttons in the toolbar to not have a box drawn around them when the user's mouse is positioned over them. Is there an easy way to get this behavior back? I don't know how I managed to remove this behavior, that's why I have no idea how to put it back in. Thanks, Max

    N 1 Reply Last reply
    0
    • M maxmaven

      Hi, I have a CToolbar and somehow managed to cause the buttons in the toolbar to not have a box drawn around them when the user's mouse is positioned over them. Is there an easy way to get this behavior back? I don't know how I managed to remove this behavior, that's why I have no idea how to put it back in. Thanks, Max

      N Offline
      N Offline
      Nibu babu thomas
      wrote on last edited by
      #2

      maxmaven wrote:

      I don't know how I managed to remove this behavior

      :) Try this style TBSTYLE_FLAT.


      Nibu thomas A Developer Programming tips[^]  My site[^]

      M 1 Reply Last reply
      0
      • N Nibu babu thomas

        maxmaven wrote:

        I don't know how I managed to remove this behavior

        :) Try this style TBSTYLE_FLAT.


        Nibu thomas A Developer Programming tips[^]  My site[^]

        M Offline
        M Offline
        maxmaven
        wrote on last edited by
        #3

        I already have this style. I think I know more about what the problem is now: My buttons are *disabled*. Is there a way in the toolbar editor to set a button to be enabled? Max

        M 1 Reply Last reply
        0
        • M maxmaven

          I already have this style. I think I know more about what the problem is now: My buttons are *disabled*. Is there a way in the toolbar editor to set a button to be enabled? Max

          M Offline
          M Offline
          maxmaven
          wrote on last edited by
          #4

          I see what is going on! If I do not assign the button an ID like "ID_APP_ABOUT", the button is disabled. It looks like the ID must match one of the symbols in the resource symbols list. I have two more questions about this: How do I make a new symbol, should I be using a wizard? How do I add an entry to the message map? (use a wizard?) By this, I mean the list below BEGIN_MESSAGE_MAP(MyApp, CWinApp) ON_COMMAND(ID_APP_ABOUT, &MyApp::OnAppAbout) // Standard file based document commands ON_COMMAND(ID_FILE_NEW, &CWinApp::OnFileNew) ON_COMMAND(ID_FILE_OPEN, &CWinApp::OnFileOpen) // Standard print setup command ON_COMMAND(ID_FILE_PRINT_SETUP, &CWinApp::OnFilePrintSetup) END_MESSAGE_MAP()

          M 1 Reply Last reply
          0
          • M maxmaven

            I see what is going on! If I do not assign the button an ID like "ID_APP_ABOUT", the button is disabled. It looks like the ID must match one of the symbols in the resource symbols list. I have two more questions about this: How do I make a new symbol, should I be using a wizard? How do I add an entry to the message map? (use a wizard?) By this, I mean the list below BEGIN_MESSAGE_MAP(MyApp, CWinApp) ON_COMMAND(ID_APP_ABOUT, &MyApp::OnAppAbout) // Standard file based document commands ON_COMMAND(ID_FILE_NEW, &CWinApp::OnFileNew) ON_COMMAND(ID_FILE_OPEN, &CWinApp::OnFileOpen) // Standard print setup command ON_COMMAND(ID_FILE_PRINT_SETUP, &CWinApp::OnFilePrintSetup) END_MESSAGE_MAP()

            M Offline
            M Offline
            maxmaven
            wrote on last edited by
            #5

            Thank you kindly for your help. I just noticed I have an entire chapter on message maps in the MFC book I bought. I will learn by reading this chapter. Once again, thank you! Max

            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