cbSizeUsed As Integer ' Size of Pen data memory block
cStrokes As Integer ' Number of strokes
cPnt As Integer ' Total number of points
cPntStrokeMax As Integer ' Length of longest stroke in points
rectBound As RECTSHORT ' Coordinates of bounding rectangle
wPndts As Integer ' State of various PDTS_??? bits
nInkWidth As Integer ' Ink Width
rgbInk As Long ' Ink Color
End Type
Global Const PDTS_LOMETRIC = &H0 ' Each logical unit is mapped to 0.01mm. Positive X to right; Positive Y down.
Global Const PDTS_HIMETRIC = &H1 ' Logical mapped to 0.001mm. X+ to right; Y+ down
Global Const PDTS_HIENGLISH = &H2 ' Logical mapped to 0.001 inch. X+ to right; y+ is down
Global Const PDTS_SCALEMAX = &H3 ' Maximum scaling allowed
Global Const PDTS_DISPLAY = &H4 ' Logical mapped to display pixel. X+ to right; Y+ is down
Global Const PDTS_ARBITRARY = &H5 ' Arbitrary scale, application dependent
Global Const PDTS_SCALEMASK = &HF ' Mask for bits of scale
Global Const PDTS_STANDARDSCALE = PDTS_HIENGLISH
Global Const PDTS_NOPENINFO = &H100 ' No PENINFO structure
Global Const PDTS_NOUPPOINTS = &H200 ' The data points on pen up have been removed
Global Const PDTS_NOOEMDATA = &H400 ' No OEM data present
Global Const PDTS_NOCOLINEAR = &H800
Global Const PDTS_COMPRESSED = &H8000 ' The data is compressed
Global Const PDTS_COMPRESSMETHOD = &HF0 ' Bits have been saved to encode which compression scheme was used
Global Const PDTS_COMPRESS2NDDERIV = &H10 ' The second derivative betwen points is stored
Global Const PDTT_DEFAULT = &H0 ' reallocates memory block to fit data. Should be run before GlobalSize(hpendata) is taken
Global Const PDTT_PENINFO = PDTS_NOPENINFO ' removes PenInfo from the header
Global Const PDTT_UPPOINTS = PDTS_NOUPPOINTS ' Throws away all data from points collected when pen is not in contact with the tablet.
Global Const PDTT_OEMDATA = PDTS_NOOEMDATA ' Removes All OEM Data that is not x,y (such as presure and angle)
Global Const PDTT_COLINEAR = PDTS_NOCOLINEAR ' Removes successive idetical points and colinear points from pendata
Global Const PDTT_COMPRESS = PDTS_COMPRESSED ' Compresses data without loss of any information.
Global Const PDTT_DECOMPRESS = &H4000 ' Decompresses Data. Cannot be used in conjunction with other timing options.
Global Const PDTT_ALL = (PDTT_PENINFO Or PDTT_UPPOINTS Or PDTT_OEMDATA Or PDTT_COLINEAR)
Global Const MAXOEMDATAWORDS = 6
Type STROKEINFO
cPnts As Integer ' Count of points in stroke
cbPnts As Integer ' Count of bytes used for stroke
wPdk As Integer ' State of stroke
dwTick As Long ' Time of stroke
End Type
Type OEMPENINFO
wPdts As Integer
wValMax As Integer
wDistinct As Integer
End Type
Type PENINFO
cxRawWidth As Integer ' Max x & width of tablet in 0.01 of inch
cyRawHeight As Integer ' Max y & height of tablet " " " "
wDistinctWidth As Integer ' Num of distinct X values returned by tablet
wDistinctHieght As Integer ' Num of distinct Y values returned by tablet
nSamplingRate As Integer ' Samples/second
nSamplingDist As Integer ' Minimum distance moved in either direction
lPdc As Long ' Pen Device capabilities
cbOemData As Integer ' Width of OEM Packet
rgoempeninfo(1 To MAXOEMDATAWORDS) As OEMPENINFO
rgwReserved(1 To 8) As Integer
End Type
Global Const PDT_NULL = 0
Global Const PDT_PRESSURE = 1
Global Const PDT_HEIGHT = 2
Global Const PDT_ANGLEXY = 3
Global Const PDT_ANGLEZ = 4
Global Const PDT_BARRELROTATION = 5
Global Const PDT_OEMSPECIFIC = 16
Global Const PDC_INTEGRATED = &H1
Global Const PDC_PROXIMITY = &H2
Global Const PDC_RANGE = &H4
Global Const PDC_INVERT = &H8
Global Const PDC_RELATIVE = &H10
Global Const PDC_BARREL1 = &H20
Global Const PDC_BARREL2 = &H40
Global Const PDC_BARREL3 = &H80
Declare Function DuplicatePenData Lib "penwin.dll" (ByVal hPenData As Integer, ByVal gMemFlags As Integer) As Integer
Declare Function CompactPenData Lib "penwin.dll" (ByVal hPenData As Integer, ByVal wTrimOptions As Integer) As Integer
Declare Function BeginEnumStrokes Lib "penwin.dll" (ByVal hPenData As Integer) As Long
Declare Function GetPenDataInfo Lib "penwin.dll" (ByVal hPenData As Integer, lppendataheader As PENDATAHEADER, lppeninfo As Any, ByVal dwReserve As Long) As Integer
Declare Function GetPenDataStroke Lib "penwin.dll" (ByVal lppendata As Long, ByVal wStroke As Integer, lplpPoint As Any, lplpvOem As Any, lpsi As STROKEINFO) As Integer
Declare Function GetPointsFromPenData Lib "penwin.dll" (ByVal hPenData As Integer, ByVal wStroke As Integer, ByVal wPnts As Integer, ByVal cPnts As Integer, lppoint As Any) As Integer
Declare Function AddPointsPenData Lib "penwin.dll" (ByVal hPenData As Integer, lpPnt As Any, lpvOemData As Any, lpsiNew As Any) As Integer
Declare Function InitRc Lib "penwin.dll" (ByVal hWnd As Integer, lpSrc As RC) As Integer
Declare Function InstallRecognizer Lib "penwin.dll" (ByVal lpszRecogName As String) As Integer
Declare Function UnInstallRecognizer Lib "penwin.dll" (ByVal hRec As Integer) As Integer
Declare Function GetGlobalRC Lib "penwin.dll" (lprc As Any, ByVal lpDefRecog As String, ByVal lpDefRecog As String, ByVal cbDefDictMax As Integer) As Integer
Declare Function SetGlobalRC Lib "penwin.dll" (lprc As Any, ByVal lpDefRecog As String, ByVal lpDefDict As String) As Integer
Declare Function TrainInk Lib "penwin.dll" (lprc As RC, ByVal hPenData As Integer, lpsyv As Any) As Integer
Declare Function TrainContext Lib "penwin.dll" (lprcResult As RC, lpSye As Any, ByVal cSye As Integer, lpSyc As Any, ByVal cSyc As Integer) As Integer
Declare Function CorrectWriting Lib "penwin.dll" (ByVal hWnd As Integer, ByVal lpstr As String, ByVal cBuf As Integer, lprc As RC, ByVal dwCwrFlags As Any, ByVal dwReserved As Any) As Integer
Declare Function BoundingRectFromPoints Lib "penwin.dll" (lpPnt As Any, ByVal cPnt, lprectBound As RECTSHORT) As Integer
Declare Function TPtoDP Lib "penwin.dll" (lpPnts As Any, ByVal cPnts As Integer) As Integer
Declare Function DPtoTP Lib "penwin.dll" (lpPnts As Any, ByVal cPnts As Integer) As Integer
Declare Function DrawPenData Lib "penwin.dll" (ByVal hDC As Integer, lpRect As RECTSHORT, ByVal hPenData As Integer) As Integer
Declare Function MetricScalePenData Lib "penwin.dll" (ByVal hPenData As Integer, ByVal wPdts) As Integer
Declare Function OffsetPenData Lib "penwin.dll" (ByVal hPenData As Integer, ByVal dx As Integer, ByVal dy As Integer) As Integer
Declare Function RecognizePenData Lib "penwin.dll" (lprc As RC, ByVal hPenData As Integer) As Integer
Declare Function CreatePenData Lib "penwin.dll" (lppenifo As PENINFO, ByVal cbOemData As Integer, ByVal wPdtScal As Integer, ByVal gMemFlags As Integer) As Integer
Declare Function ExecuteGesture Lib "penwin.dll" (ByVal hWnd As Integer, ByVal Syv As Long, lprcResult As RC)