Refer to the
C/C++ Programmer Reference Guide.
You can either use Joystick::GetRawAxis(UINT32 axis), where axis is a value between 1 and 6 specifying the axis, or you can simply use Joystick::GetX() and Joystick::GetY(). All of these functions return a floating point value between -1.0f and 1.0f. Returning values between 0 and 255 will lower your precision, as a floating point variable can hold much more data than an unsigned character.