I'd like to integrate surface pen capabilities into my application. It's written using Delphi 10 Seattle. I've searched all over the web and can't find anything.
Does anyone know how to program for the Pen? Specifically, to capture the pressure level, pen down, pen up and pen move events.
Your application needs to handle the WM_POINTERUPDATE
message.
During that message you can call GetPointerPenInfo to retrieve information about the current status of the pointer as a POINTER_PEN_INFO
structure:
POINTER_PEN_INFO = record
pointerInfo: POINTER_INFO;
penFlags: PEN_FLAGS;
penMask: PEN_MASK;
pressure: UINT32;
rotation UINT32;
tiltX: INT32;
tiltY: INT32;
end;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With