While learning how to draw, a common concept that comes up is "mileage". I have a Surface Pro and thought it would be fun to make a simple tray app that would actually track the distances that my pen moves while I practice.
There is the Windows Ink API for .NET, which has a variety of events that can be handled in order to track this, but they all seem to require the pen input to take place inside of a WPF window. I want to be able to track pen usage from a background process.
Typically, if you want to monitor mouse inputs from a background process, you need to use low level hooks such as SetWindowsHookEx and handle events that way. However, I only want to capture data when the pen/stylus is touching the screen while avoiding mouse clicks and touch input. How can I accomplish this?