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. Is Keyboard Hooks the answer to my problem

Is Keyboard Hooks the answer to my problem

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpcsharpvisual-studio
2 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.
  • B Offline
    B Offline
    BenPage
    wrote on last edited by
    #1

    Hi there. I am currently working on a project to identify users using their typing dynamics. I want to use the intervals between keystrokes on the keyboard as a user type in their passwords, to identify the users. I am using Windows XP and Visual Studio C++ 2003 to develope a MFC application project. I want to use a dialog with an edit box to allow the user to enter his/her username and password. I cannot process the WM_KEYDOWN and WM_KEYUP messages because when you type in the edit box, the keyboard focus is on the edit box and not on the dialog. Will a keyboard hook help me in my mission or will I have to use something else. Something else that is easier to use will also work. If you could help me I would appreciate it alot. Thank You. Ben

    G 1 Reply Last reply
    0
    • B BenPage

      Hi there. I am currently working on a project to identify users using their typing dynamics. I want to use the intervals between keystrokes on the keyboard as a user type in their passwords, to identify the users. I am using Windows XP and Visual Studio C++ 2003 to develope a MFC application project. I want to use a dialog with an edit box to allow the user to enter his/her username and password. I cannot process the WM_KEYDOWN and WM_KEYUP messages because when you type in the edit box, the keyboard focus is on the edit box and not on the dialog. Will a keyboard hook help me in my mission or will I have to use something else. Something else that is easier to use will also work. If you could help me I would appreciate it alot. Thank You. Ben

      G Offline
      G Offline
      Graham Bradshaw
      wrote on last edited by
      #2

      If you subclass the edit box, you can pick up the WM_KEYDOWN and WM_KEYUP messages (or indeed any other message), and process them. This article[^] shows how to capture key strokes to create a numeric-only edit box, but it shows how to capture the messages, process them, and then pass them on to the parent window, which is what you'll need to do, I would think.

      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