Finding a pen - no mice please RRS feed

  • Question

  • Hi,

    Working in unmamanaged C++ environment I have to use the CoCreateInstance(CLSID_RealTimeStylus, ... COM interface. How can I ensure that my application is attached to a real pen - not a redirected mouse or mouse pad?

    Thanks in advance



    Sunday, February 12, 2012 11:45 AM

All replies

  • Some more info - sorry if I was possibly too tight-lipped (again).

    I work on a kind of old-fashioned on-screen drawing app using pen (not fingers). Technically I just want to get the penDown, penUp and penmOve (Packet) events from the stylus. Simple unmanaged C++ code, no Ink, no gesture recognition, no flicks.

    Now, on my Asus B121 tablet the application gets these events but when I compare the packets from RealTimeStylus to the Mouse Events of wndProc - they are absolutely identical. With other words - very patchy input arrives at both handlers. Indeed it looks as if RealTimeStylus is fed from the polled "mouse" service. This is very frustrating as the B121 has a really fine Wacom tablet integrated under the screen + pen. Yes, I have the newest driver for it.

    Also, when I ask for the tablets via GetAllTabletContextIds() it says it had none. Similarly, GetStyluses() tells none is available. Strange, when you actually use one as the only human input device on the system.

    What is wrong here? Can anyone explain please?


    Tuesday, February 14, 2012 11:01 PM