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 "catch" keystrokes from other applications

How to "catch" keystrokes from other applications

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

    I want my applications to "monitor" all keys pressed (or messages in general) in another application. I know it's possible, since Spy++ does exacly that and much more; so how do I do it? I also want it to just monitor one specific application. I guess I'll have to use ::FindWindow() or something? Please help :) Sprudling

    T R F 4 Replies Last reply
    0
    • S Sprudling

      I want my applications to "monitor" all keys pressed (or messages in general) in another application. I know it's possible, since Spy++ does exacly that and much more; so how do I do it? I also want it to just monitor one specific application. I guess I'll have to use ::FindWindow() or something? Please help :) Sprudling

      T Offline
      T Offline
      Tomasz Sowinski
      wrote on last edited by
      #2

      You'll need a hook - docs for SetWindowsHookEx are a good starting point. Tomasz Sowinski -- http://www.shooltz.com

      1 Reply Last reply
      0
      • S Sprudling

        I want my applications to "monitor" all keys pressed (or messages in general) in another application. I know it's possible, since Spy++ does exacly that and much more; so how do I do it? I also want it to just monitor one specific application. I guess I'll have to use ::FindWindow() or something? Please help :) Sprudling

        R Offline
        R Offline
        Ravi Bhavnani
        wrote on last edited by
        #3

        Create a keyboard hook.   http://www.preview.org/q/q2108.shtml /ravi "There is always one more bug..." http://www.ravib.com ravib@ravib.com

        1 Reply Last reply
        0
        • S Sprudling

          I want my applications to "monitor" all keys pressed (or messages in general) in another application. I know it's possible, since Spy++ does exacly that and much more; so how do I do it? I also want it to just monitor one specific application. I guess I'll have to use ::FindWindow() or something? Please help :) Sprudling

          R Offline
          R Offline
          Ravi Bhavnani
          wrote on last edited by
          #4

          Sorry about the Delphi link. Hopefully it's still somewhat helpful. /ravi "There is always one more bug..." http://www.ravib.com ravib@ravib.com

          1 Reply Last reply
          0
          • S Sprudling

            I want my applications to "monitor" all keys pressed (or messages in general) in another application. I know it's possible, since Spy++ does exacly that and much more; so how do I do it? I also want it to just monitor one specific application. I guess I'll have to use ::FindWindow() or something? Please help :) Sprudling

            F Offline
            F Offline
            Fazlul Kabir
            wrote on last edited by
            #5

            Check this knowledge base article Hope this helps. // Fazlul


            Get RadVC today! Play RAD in VC++ http://www.capitolsoft.com

            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