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. capturing keypressing events when focus is on different window

capturing keypressing events when focus is on different window

Scheduled Pinned Locked Moved C / C++ / MFC
jsontutorialquestion
3 Posts 2 Posters 1 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
    sulaxan
    wrote on last edited by
    #1

    we have one editor(Text) which is executable. we want to write an application which captures the keyboard press events when user is typing into the editor. we can get the editor window handle by FindWindow() win32 API. But how to capture the keyboard Events when user is typing something into Editor??. thanks in advance adi narayana.

    J 2 Replies Last reply
    0
    • S sulaxan

      we have one editor(Text) which is executable. we want to write an application which captures the keyboard press events when user is typing into the editor. we can get the editor window handle by FindWindow() win32 API. But how to capture the keyboard Events when user is typing something into Editor??. thanks in advance adi narayana.

      J Offline
      J Offline
      Jeremy Falcon
      wrote on last edited by
      #2

      You'll either have to install a hook on the external window and intercept its WM_KEYDOWN, etc. messages or use functions like GetKeyState() and GetAsyncKeyState() to retreive the keyboard state (globally) in a loop. Jeremy Falcon Imputek

      1 Reply Last reply
      0
      • S sulaxan

        we have one editor(Text) which is executable. we want to write an application which captures the keyboard press events when user is typing into the editor. we can get the editor window handle by FindWindow() win32 API. But how to capture the keyboard Events when user is typing something into Editor??. thanks in advance adi narayana.

        J Offline
        J Offline
        Jeremy Falcon
        wrote on last edited by
        #3

        BTW, if you are trying to make a password snatcher I'll kill you! ;P Jeremy Falcon Imputek

        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