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. How to set Shortcutkeys for Toolbar buttons?

How to set Shortcutkeys for Toolbar buttons?

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
4 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.
  • P Offline
    P Offline
    P_JAYAPRAKASH
    wrote on last edited by
    #1

    Give me some code sample. Thanks ALL THINGS ARE POSSIBLE UNTIL THEY ARE PROVED IMPOSSIBLE-AND EVEN THE IMPOSSIBLE MAY ONLY BE SO,AS OF NOW

    V 1 Reply Last reply
    0
    • P P_JAYAPRAKASH

      Give me some code sample. Thanks ALL THINGS ARE POSSIBLE UNTIL THEY ARE PROVED IMPOSSIBLE-AND EVEN THE IMPOSSIBLE MAY ONLY BE SO,AS OF NOW

      V Offline
      V Offline
      Vikram Kashyap
      wrote on last edited by
      #2

      Hi, Create the accelerators for the toolbar buttons using the resource editor... Vikram Kashyap "You will never fail until you stop trying"

      P 1 Reply Last reply
      0
      • V Vikram Kashyap

        Hi, Create the accelerators for the toolbar buttons using the resource editor... Vikram Kashyap "You will never fail until you stop trying"

        P Offline
        P Offline
        P_JAYAPRAKASH
        wrote on last edited by
        #3

        Hey thnaks for ur reply.i tried this. but it is not working. after adding accelerator key.should i write some code to catch that message. ALL THINGS ARE POSSIBLE UNTIL THEY ARE PROVED IMPOSSIBLE-AND EVEN THE IMPOSSIBLE MAY ONLY BE SO,AS OF NOW

        V 1 Reply Last reply
        0
        • P P_JAYAPRAKASH

          Hey thnaks for ur reply.i tried this. but it is not working. after adding accelerator key.should i write some code to catch that message. ALL THINGS ARE POSSIBLE UNTIL THEY ARE PROVED IMPOSSIBLE-AND EVEN THE IMPOSSIBLE MAY ONLY BE SO,AS OF NOW

          V Offline
          V Offline
          Vikram Kashyap
          wrote on last edited by
          #4

          Hi, Yes, you need to load that Accelerator table. HACCEL gAccel; //Declare in header file //Add this code to the OnInItDialog of your dialog class gAccel = LoadAccelerators(AfxGetApp()->m_hInstance,MAKEINTRESOURCE(IDR_MYACCEL)); //Add this code to PreTranslateMessage if(TranslateAccelerator(AfxGetMainWnd()->m_hWnd,gAccel,pMsg)) return FALSE; This should work.... Thanx and Bye Vikram Kashyap "You will never fail until you stop trying"

          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