Wm_input

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • RE: Wm_input

      I haven't played with WM_INPUT yet - for those unfamiliar with this message it is one you can use to accept raw input data from human interface devices like touchscreens and even microphones.

      Since the nature of this message is to let you code straight to the hardware, I guess I might ask you what kind of device you are looking at supporting, and why going for WM_INPUT is better than a hardware independent method (if one exists) ?
      Mr.Mike
      Author, Programmer, Brewer, Patriot
    • I have seen many posts and advice from Microsoft to not use DirectInput anymore and to use either WM_MOUSEMOVE, etc. or WM_INPUT messages to capture the mouse and keyboard going forward. From what I read, DirectInput behind the scenes spawns a thread and reads WM_INPUT messages also. So by registering and consuming WM_INPUT directly, it removes the need for DirectInput.

      Thanks for the response Mike.

      What are your thoughts on DirectInput? Do you think it is still the way to go for capturing Mouse and Keyboard input?
    • If you are just doing mouse/keyboard/joystick/controllers, there's no big reason to use DirectInput. In the book I even grab controller/joystick messages via the MM_JOY*** messages rather than use DirectInput, and it worked just fine and was completely trivial to implement.

      Given the above, it would be interesting to hear from anyone out there what DirectInput really gives them...probably analog button values for things like triggers, etc. that aren't directly supported by the MM_JOY*** messages.

      But, I think I'd probably rather use DirectInput than grabbing the raw hardware data - which will change from device to device.
      Mr.Mike
      Author, Programmer, Brewer, Patriot