DirectInputは、サンプル(Joystick)を参考にすればすぐにできるかと