Question

How can I add support for tablet drawing to my projects? What I mean is that most pen tablets have the functionality of acting as "normal" pointing devices when held regularly, but when the pen is flipped, it acts as an eraser (OneNote works this way, for example).

How can I detect which side of the pen is being used?

Was it helpful?

Solution

I would follow the native API of your tablet. Your tablet's vendor has very well described SDK including several examples (in Visual C++).

What you are specifically looking for is the eraser detection

OTHER TIPS

Dealing with WinTab is easy enough if all you want is to detect device type. However it can get a lot more confusing if you want to process absolute positions, pen orientation and pressure. There's a good C++ lib for dealing with this:

http://www.billbaxter.com/projects/bbtablet/index.html

Even if you don't want to go through the effort of wrapping it to use it directly, you can learn from the source if you get stuck.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top