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. Button hotkeys not showing

Button hotkeys not showing

Scheduled Pinned Locked Moved C / C++ / MFC
comtutorialquestion
7 Posts 4 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
    Josh Lindenmuth
    wrote on last edited by
    #1

    How can we ensure that menu and button accelerators (&) are displayed when the dialog or application are created? Our application only shows the underlined characters after the ALT key is pressed. On the menu, the underlined characters go away, but on the dialog they stay. We'd like the underlines to always show up. This seems to be an application-wide setting. For example, notepad and internet explorer 6 don't show the underlined characters until the ALT key is pressed. Mozilla and Outlook do. I know that this is a display setting in XP/2000, but there has to be some work-around since all the office programs have persistent underlines for the hotkeys. Thank you, Josh Lindenmuth Paytime, Inc. jlindenmuth@paytimepayroll.com

    I D 2 Replies Last reply
    0
    • J Josh Lindenmuth

      How can we ensure that menu and button accelerators (&) are displayed when the dialog or application are created? Our application only shows the underlined characters after the ALT key is pressed. On the menu, the underlined characters go away, but on the dialog they stay. We'd like the underlines to always show up. This seems to be an application-wide setting. For example, notepad and internet explorer 6 don't show the underlined characters until the ALT key is pressed. Mozilla and Outlook do. I know that this is a display setting in XP/2000, but there has to be some work-around since all the office programs have persistent underlines for the hotkeys. Thank you, Josh Lindenmuth Paytime, Inc. jlindenmuth@paytimepayroll.com

      I Offline
      I Offline
      Iain Clarke Warrior Programmer
      wrote on last edited by
      #2

      You are right that it is a display setting ( SystemParametersInfo (SPI_GETKEYBOARDCUES, 0, &bSet, 0)). But my copy of IE6 hides the _ until the Alt key is pressed too. My guess is that Mozilla et al draw their own buttons and (naughtily) ignore the users preferences. I know Office apps reimplement loads of controls each time a new version is released. Then the rest of us who want to look "modern" play catch up! You could also do owner draw windows, but that sounds like a lot of hard work! Surely this is a choice your user makes, not you. If they want to the _s that much, show them how to toggle the preference. If not, let them not see the _s, as that is how they want it! Iain.

      J 1 Reply Last reply
      0
      • J Josh Lindenmuth

        How can we ensure that menu and button accelerators (&) are displayed when the dialog or application are created? Our application only shows the underlined characters after the ALT key is pressed. On the menu, the underlined characters go away, but on the dialog they stay. We'd like the underlines to always show up. This seems to be an application-wide setting. For example, notepad and internet explorer 6 don't show the underlined characters until the ALT key is pressed. Mozilla and Outlook do. I know that this is a display setting in XP/2000, but there has to be some work-around since all the office programs have persistent underlines for the hotkeys. Thank you, Josh Lindenmuth Paytime, Inc. jlindenmuth@paytimepayroll.com

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        This is a user-configured thing (i.e., what would the user think if an application came along and overruled their UI settings). You've probably already found this, but right-click the desktop and select Properties. Click the Effects tab. Un/check the "Hide keyboard navigation indicators until I use the Alt key" checkbox.


        "When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen

        1 Reply Last reply
        0
        • I Iain Clarke Warrior Programmer

          You are right that it is a display setting ( SystemParametersInfo (SPI_GETKEYBOARDCUES, 0, &bSet, 0)). But my copy of IE6 hides the _ until the Alt key is pressed too. My guess is that Mozilla et al draw their own buttons and (naughtily) ignore the users preferences. I know Office apps reimplement loads of controls each time a new version is released. Then the rest of us who want to look "modern" play catch up! You could also do owner draw windows, but that sounds like a lot of hard work! Surely this is a choice your user makes, not you. If they want to the _s that much, show them how to toggle the preference. If not, let them not see the _s, as that is how they want it! Iain.

          J Offline
          J Offline
          Josh Lindenmuth
          wrote on last edited by
          #4

          The problem is that hiding the hotkeys is the default behavior in Windows 2000/XP (so the users don't "want it", they just don't know any better). We also have hundreds of clients who are relatively computer illiterate, and think they can't use the keyboard to access all buttons (which they can). Since hotkeys are always visible in Office, Outlook, Mozilla, and many other applications under XP/2000, it is difficult to believe that Microsoft and others are spending the time to create new controls or owner drawn windows just to enable hotkeys to be visible ... seems more likely that there is an application setting somewhere. Thoughts? Josh Lindenmuth Paytime, Inc. jlindenmuth@paytimepayroll.com

          A I 3 Replies Last reply
          0
          • J Josh Lindenmuth

            The problem is that hiding the hotkeys is the default behavior in Windows 2000/XP (so the users don't "want it", they just don't know any better). We also have hundreds of clients who are relatively computer illiterate, and think they can't use the keyboard to access all buttons (which they can). Since hotkeys are always visible in Office, Outlook, Mozilla, and many other applications under XP/2000, it is difficult to believe that Microsoft and others are spending the time to create new controls or owner drawn windows just to enable hotkeys to be visible ... seems more likely that there is an application setting somewhere. Thoughts? Josh Lindenmuth Paytime, Inc. jlindenmuth@paytimepayroll.com

            A Offline
            A Offline
            Antony M Kancidrowski
            wrote on last edited by
            #5

            Josh Lindenmuth wrote: it is difficult to believe that Microsoft and others are spending the time to create new controls or owner drawn windows just to enable hotkeys to be visible Microsoft seem to have a team that redesign the UI in order to keep us all on our toes playing catchup. They are always changing the GUI style. I guess Mozilla uses open source cross platform libraries and therefore does not look for the particular windows settings. Ant. I'm hard, yet soft.
            I'm coloured, yet clear.
            I'm fruity and sweet.
            I'm jelly, what am I? Muse on it further, I shall return!
            - David Williams (Little Britain)

            1 Reply Last reply
            0
            • J Josh Lindenmuth

              The problem is that hiding the hotkeys is the default behavior in Windows 2000/XP (so the users don't "want it", they just don't know any better). We also have hundreds of clients who are relatively computer illiterate, and think they can't use the keyboard to access all buttons (which they can). Since hotkeys are always visible in Office, Outlook, Mozilla, and many other applications under XP/2000, it is difficult to believe that Microsoft and others are spending the time to create new controls or owner drawn windows just to enable hotkeys to be visible ... seems more likely that there is an application setting somewhere. Thoughts? Josh Lindenmuth Paytime, Inc. jlindenmuth@paytimepayroll.com

              I Offline
              I Offline
              Iain Clarke Warrior Programmer
              wrote on last edited by
              #6

              Josh Lindenmuth wrote: ...it is difficult to believe that Microsoft and others are spending the time to create new controls or owner drawn windows just to enable hotkeys to be visible... Actually, it's all too plausible. Just look at the new menu styles, the flat look brought in by Encarta, etc. The underlining bit is probably incidental. There is nothing to stop your application calling SystemParameterInfo (SPI_SETKEYBOARDCUES, ...). But this could be in your options page, with a note above it warning that it has an effect on all programs. Or, when the program is first run, or at installation, detect the setting and ask if the user wants to change it. And so on. My company supplies PC with my software preinstalled. So it is the reason that PC exists. So I don't have to be a good software citizen. But it would annoy me as an end user if software I installed unilaterally overrode my settings. Prompting me that changing them may improve my experience is a valid compromise... Iain.

              1 Reply Last reply
              0
              • J Josh Lindenmuth

                The problem is that hiding the hotkeys is the default behavior in Windows 2000/XP (so the users don't "want it", they just don't know any better). We also have hundreds of clients who are relatively computer illiterate, and think they can't use the keyboard to access all buttons (which they can). Since hotkeys are always visible in Office, Outlook, Mozilla, and many other applications under XP/2000, it is difficult to believe that Microsoft and others are spending the time to create new controls or owner drawn windows just to enable hotkeys to be visible ... seems more likely that there is an application setting somewhere. Thoughts? Josh Lindenmuth Paytime, Inc. jlindenmuth@paytimepayroll.com

                I Offline
                I Offline
                Iain Clarke Warrior Programmer
                wrote on last edited by
                #7

                I've just though of a possible method for you. Look at API hooking, hook the SystemParameterInfo function, and tell lies to your software about the underlining flag state. http://www.codeproject.com/info/search.asp?target=api+hooking&st=kw&qm=all[^] http://www.codeproject.com/dll/hookimport.asp[^] One downside I can see is that the function lives in User32.dll, as does the WndProcs for the buttons, menus etc. Its worth a try though! Iain.

                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