The scroll wheel in the mouse has typically 3 pins. One is the COM (ground), the other is the A and B that determines the quadrature encoding and its body itself should be connected to Vcc (+5V).
Wire Soldering mosue encoder switch CEN8080 Series and The SMT type mini mouse scroll encoder