How to use UDP driver like a mouse driver

  • Hello everybody,

    I have installed the native I2C driver, and the UDP driver for rotary encoders with push function (NetDCU8, WinCE, no MFC). Now I would like to have the same behaviour like a wheel mouse. So, I want to be able to capture the WM_MOUSEWHEEL message, and resolve the number of "wheel rotation ticks" (from HIWORD(wParam)/WHEEL_DELTA) at once, not having to process every single "tick" in a seperate call of the routine.

    Currently I process the WM_KEYDOWN message, get the virtual key code and process this message in a seperat routine. But if there occur several "virtual keystrokes" successively, I think it's a overhead processing each one seperately.

    Second issue: slso some "keystrokes" by the UDP are not recognized by the system, when the rotation speed is very high. What's the reason for this behaviour?


  • Hello,

    1) at the time it is not possible to capture WM_MOUSEWHEEL by use of udp.dll. Udp.dll uses only the OS function "::keybd_event()" to tell windows that a wheel action occurs. The advantage is that you can include more than one rotary encoders. Maybe in future we will expand the driver (for WM_XXX configuration via registry) but it is not currently intended.

    2) i will do some timemeasure to find what does slow down. But if you need only one "accurate" rotary encoder it may be the best to access the i2c interface direct.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.