Search code examples
c++visual-c++directxmouseeventdirectx-9

C++ How to catch Mouse wheel up and down?


Is there any ascii value for mouse wheel up and down. I found this for mouse wheel, but this one does not care if I'm scrolling down or up 8) and acting in boot states.

case 0x020A:    //MOUSE Whell
{
    g_fDistance += 0.5f;

}break;

Thanks for any help and suggestions.


Solution

  • No ascii for this, ascii is for characters, not hardware inputs.

    I always use a device inputs library like OIS to do this : http://sourceforge.net/projects/wgois/ It does all the translation work for you to get clear transformed input informations about keyboards, joysticks, mouses, wiimote...

    That way I avoid OS-specific libs and make my life easier.