I've been playing around lately with rotary encoders and Arduino. A rotary encoder looks like a potentiometer but works much differently. Two physical differences typically found between them is an encoder has discrete clicks with rotation and does not have stops, can be turned in one direction indefinitely. The output of an encoder is two square waves. The direction turned can be determined by the phase difference between the two outputs. To use as a windows usb joystick device you use each click (of rotation) as a button press. For example, rotate cw, button 1 is pressed for each click. Rotate ccw, button 2.
You want to set a duration held for each button within the sketch (code). This requires some testing within the application in which the encoder will be used. I've found 100ms (1/10 second) to be a good duration for most of what I have in mind.
I'll add that you could also store a value equal to the number of rotation clicks since a specified event and pass that on to your application.
I suppose you could also code it to function as a potentiometer. Such that when whatever variable you use to store the number of clicks in one direction reaches a pot voltage equivalent that variable stops changing. When you rotate the other way the value is decremented until it reaches the other end of the range. You might need to interface that functionality apart from the Windows USB controllers though.