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 do i sense ctrl+C in a dialog based application?

how do i sense ctrl+C in a dialog based application?

Scheduled Pinned Locked Moved C / C++ / MFC
question
4 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.
  • U Offline
    U Offline
    User 3249416
    wrote on last edited by
    #1

    how do i sense ctrl+C in a dialog based application?

    H S 2 Replies Last reply
    0
    • U User 3249416

      how do i sense ctrl+C in a dialog based application?

      H Offline
      H Offline
      heman154
      wrote on last edited by
      #2

      Use the RegisterHotKey Function. The function parameters let you input which window will receive the hotkey, and the specific key combination you need. Then in your window, place an ON_MESSAGE message map function that associates the WM_HOTKEY message with the function you want to call when the hotkey is pressed. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputfunctions/registerhotkey.asp[^]

      T 1 Reply Last reply
      0
      • U User 3249416

        how do i sense ctrl+C in a dialog based application?

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

        theerkanamai wrote: how do i sense ctrl+C in a dialog based application? If your just looking to handle the Ctrl-C key while your dialog is in focus, you can easily add an accelerator key. In the resource view locate the Accelerator folder. Double click to open it, right click and scroll down to “New Accelerator” -------------------------------

        1 Reply Last reply
        0
        • H heman154

          Use the RegisterHotKey Function. The function parameters let you input which window will receive the hotkey, and the specific key combination you need. Then in your window, place an ON_MESSAGE message map function that associates the WM_HOTKEY message with the function you want to call when the hotkey is pressed. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputfunctions/registerhotkey.asp[^]

          T Offline
          T Offline
          ThatsAlok
          wrote on last edited by
          #4

          Sorry Heman! RegisterHotKey function never register Hotkey for Ctrl+c as it is previously register by window for system wide Clipboard usage!

          "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

          cheers, Alok Gupta

          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