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. Acceleration keys on CMenu is not shown !

Acceleration keys on CMenu is not shown !

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelp
3 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.
  • S Offline
    S Offline
    sdancer75
    wrote on last edited by
    #1

    I create dynamically a CMenu inside a CDialog that have some acceleration keys ie

    m_pBCMenu->AppendMenu(MF_STRING, ID_MENU_STRETCH_NORMAL, _T("&Size\tAlt+1"));

    The same menu, is also created inside in CMainFrm that all command events (even from the CDialog) are routed and handled in there. The problem is that the acceleration keys in my CDialog are not shown, ie Alt+1 is hidden but the commands are routed just fine. How can I force to view the acceleration keys inside the CDialog's CMenu ? Note, that I used the LoadAccelerators function successfully on my onInitDialog and I also tried to use ON_COMMAND(xxx,xxxx) in my CDialog without any success. Any recommendations ?

    sdancer75

    J 1 Reply Last reply
    0
    • S sdancer75

      I create dynamically a CMenu inside a CDialog that have some acceleration keys ie

      m_pBCMenu->AppendMenu(MF_STRING, ID_MENU_STRETCH_NORMAL, _T("&Size\tAlt+1"));

      The same menu, is also created inside in CMainFrm that all command events (even from the CDialog) are routed and handled in there. The problem is that the acceleration keys in my CDialog are not shown, ie Alt+1 is hidden but the commands are routed just fine. How can I force to view the acceleration keys inside the CDialog's CMenu ? Note, that I used the LoadAccelerators function successfully on my onInitDialog and I also tried to use ON_COMMAND(xxx,xxxx) in my CDialog without any success. Any recommendations ?

      sdancer75

      J Offline
      J Offline
      Jochen Arndt
      wrote on last edited by
      #2

      Are the accelerators shown when pressing the Alt key? Then this MSDN blog post answers your question why they are not shown: http://blogs.msdn.com/b/oldnewthing/archive/2005/05/03/414317.aspx[^].

      S 1 Reply Last reply
      0
      • J Jochen Arndt

        Are the accelerators shown when pressing the Alt key? Then this MSDN blog post answers your question why they are not shown: http://blogs.msdn.com/b/oldnewthing/archive/2005/05/03/414317.aspx[^].

        S Offline
        S Offline
        sdancer75
        wrote on last edited by
        #3

        Hi, I don't mean the underline char accelerators but the keyboard shortcuts ie Ctrl-F1 that are loaded with LoadAccel(). I already read the article you pointed to me, but does not fit in my case. Regards,

        sdancer75

        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