Back in the days (ca. 1993) I wrote a driver for serial "digitizer" (tablet without pressure sensor) and had adapted it to send DPaintIV commands from a a toolbar (the tablet allowed for a pice of printetd paper below its transparent surface).
All aimed at commercial project which eventually fell through.
No I don't have the sources anymore, but the protocol was pretty straightforward.