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 keyboard inputs

capturing keyboard inputs

Scheduled Pinned Locked Moved C / C++ / MFC
question
3 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.
  • A Offline
    A Offline
    Adnan Merter
    wrote on last edited by
    #1

    i would like to create a windows form application which captures the keyboard inputs. Can someone tell me the best and easiest method? thanks...

    M 1 Reply Last reply
    0
    • A Adnan Merter

      i would like to create a windows form application which captures the keyboard inputs. Can someone tell me the best and easiest method? thanks...

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      Do you mean Windows Forms in .NET or a dialog form? For forms in .NET, you'r on the wrong discussion board - use the Managed C++/CLI board[^] instead. Otherwise, any window in a Windows app that has the keyboard focus will receive WM_KEYDOWN and WM_KEYUP messages, and also WM_CHAR messages if TranslateMessage is caled in the app/thread's message loop. If you want to catch keyboard input system-wide, you can use a hook.  See SetWindowsHookEx[^] Mark

      Mark Salsbery Microsoft MVP - Visual C++ :java:

      A 1 Reply Last reply
      0
      • M Mark Salsbery

        Do you mean Windows Forms in .NET or a dialog form? For forms in .NET, you'r on the wrong discussion board - use the Managed C++/CLI board[^] instead. Otherwise, any window in a Windows app that has the keyboard focus will receive WM_KEYDOWN and WM_KEYUP messages, and also WM_CHAR messages if TranslateMessage is caled in the app/thread's message loop. If you want to catch keyboard input system-wide, you can use a hook.  See SetWindowsHookEx[^] Mark

        Mark Salsbery Microsoft MVP - Visual C++ :java:

        A Offline
        A Offline
        Adnan Merter
        wrote on last edited by
        #3

        i got my answer it is helpfull thanx...

        --we were great,and we will rise again-- --------Don't forget-------------------- --always comes daylight after night-----

        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