Click to Rate and Give Feedback
MSDN
MSDN Library
DirectX
SDK Documentation
DirectX Input
DirectInput
Tutorials

  Switch on low bandwidth view
Tutorial 3: Using the Joystick
Bb206283.XDK_CHM_BANNER_left(en-us,VS.85).jpgBb206283.XDK_CHM_BANNER_right(en-us,VS.85).jpg

Tutorial 3: Using the Joystick

This tutorial shows you how to enumerate a joystick attached to a system and set it up for input. Code samples are based on the Joystick Sample.

The first step of setting up the Microsoft DirectInput system and the final step of closing it down are the same for any application and are covered in Tutorial 1: Using the Keyboard.

The first step in this tutorial is to enumerate devices; that is, to see what joysticks are available. As part of this process you initialize each joystick device and set its desired characteristics. You then use the IDirectInputDevice8 Interface interface methods to retrieve data from each joystick.

This tutorial divides the required tasks into the following steps.

Steps

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker