Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

510 lines
24 KiB

  1. '====================================================================='
  2. '= PENAPI.TXT Windows for Pens - Visual Basic Declarations ='
  3. '= ='
  4. '= Copyright (c) 1992-94, Microsoft Corp. ='
  5. '= All rights reserved. ='
  6. '= ='
  7. '====================================================================='
  8. '====================================================================='
  9. '= Register Pen Applications ='
  10. '====================================================================='
  11. Declare Function RegisterPenApps Lib "penwin.dll" (ByVal wFlags As Integer, ByVal fRegister As Integer) As Integer
  12. Declare Function IsPenAware Lib "penwin.dll" () As Integer
  13. Declare Function GetVersionPenWin Lib "penwin.dll" () As Integer
  14. '====================================================================='
  15. '= ALC CODES ='
  16. '====================================================================='
  17. ' These constants are used when defining the
  18. ' CharSet property of HEdits and BEdits
  19. Global Const ALC_ALL = &H43FF
  20. Global Const ALC_DEFAULT = &H0
  21. Global Const ALC_LCALPHA = &H1
  22. Global Const ALC_UCALPHA = &H2
  23. Global Const ALC_ALPHA = &H3
  24. Global Const ALC_NUMERIC = &H4
  25. Global Const ALC_ALPHANUMERIC = &H7
  26. Global Const ALC_PUNC = &H8
  27. Global Const ALC_MATH = &H10
  28. Global Const ALC_MONETARY = &H20
  29. Global Const ALC_OTHER = &H40
  30. Global Const ALC_WHITE = &H100
  31. Global Const ALC_NONPRINT = &H200
  32. Global Const ALC_GESTURE = &H4000
  33. Global Const ALC_USEBITMAP = &H8000
  34. Global Const ALC_DBCS = &H400
  35. Global Const ALC_HIRAGANA = &H100000
  36. Global Const ALC_KATAKANA = &H200000
  37. Global Const ALC_KANJI = &H40000
  38. Global Const ALC_OEM = &HFF80000
  39. Global Const ALC_RESERVED = &H43FF
  40. Global Const ALC_NONPRIORITY = &H0
  41. Global Const ALC_SYSMINIMUM = (ALC_ALPHANUMERIC Or ALC_WHITE Or ALC_GESTURE)
  42. '====================================================================='
  43. '= Point and Rectangle Structures ='
  44. '====================================================================='
  45. Type POINTSHORT
  46. x As Integer
  47. y As Integer
  48. End Type
  49. Type RECTSHORT
  50. left As Integer
  51. top As Integer
  52. right As Integer
  53. bottom As Integer
  54. End Type
  55. '====================================================================='
  56. '= Maniplating Pen Data ='
  57. '====================================================================='
  58. Type PENDATAHEADER
  59. wVersion As Integer ' Pen Data format Version
  60. cbSizeUsed As Integer ' Size of Pen data memory block
  61. cStrokes As Integer ' Number of strokes
  62. cPnt As Integer ' Total number of points
  63. cPntStrokeMax As Integer ' Length of longest stroke in points
  64. rectBound As RECTSHORT ' Coordinates of bounding rectangle
  65. wPndts As Integer ' State of various PDTS_??? bits
  66. nInkWidth As Integer ' Ink Width
  67. rgbInk As Long ' Ink Color
  68. End Type
  69. Global Const PDTS_LOMETRIC = &H0 ' Each logical unit is mapped to 0.01mm. Positive X to right; Positive Y down.
  70. Global Const PDTS_HIMETRIC = &H1 ' Logical mapped to 0.001mm. X+ to right; Y+ down
  71. Global Const PDTS_HIENGLISH = &H2 ' Logical mapped to 0.001 inch. X+ to right; y+ is down
  72. Global Const PDTS_SCALEMAX = &H3 ' Maximum scaling allowed
  73. Global Const PDTS_DISPLAY = &H4 ' Logical mapped to display pixel. X+ to right; Y+ is down
  74. Global Const PDTS_ARBITRARY = &H5 ' Arbitrary scale, application dependent
  75. Global Const PDTS_SCALEMASK = &HF ' Mask for bits of scale
  76. Global Const PDTS_STANDARDSCALE = PDTS_HIENGLISH
  77. Global Const PDTS_NOPENINFO = &H100 ' No PENINFO structure
  78. Global Const PDTS_NOUPPOINTS = &H200 ' The data points on pen up have been removed
  79. Global Const PDTS_NOOEMDATA = &H400 ' No OEM data present
  80. Global Const PDTS_NOCOLINEAR = &H800
  81. Global Const PDTS_COMPRESSED = &H8000 ' The data is compressed
  82. Global Const PDTS_COMPRESSMETHOD = &HF0 ' Bits have been saved to encode which compression scheme was used
  83. Global Const PDTS_COMPRESS2NDDERIV = &H10 ' The second derivative betwen points is stored
  84. Global Const PDTT_DEFAULT = &H0 ' reallocates memory block to fit data. Should be run before GlobalSize(hpendata) is taken
  85. Global Const PDTT_PENINFO = PDTS_NOPENINFO ' removes PenInfo from the header
  86. Global Const PDTT_UPPOINTS = PDTS_NOUPPOINTS ' Throws away all data from points collected when pen is not in contact with the tablet.
  87. Global Const PDTT_OEMDATA = PDTS_NOOEMDATA ' Removes All OEM Data that is not x,y (such as presure and angle)
  88. Global Const PDTT_COLINEAR = PDTS_NOCOLINEAR ' Removes successive idetical points and colinear points from pendata
  89. Global Const PDTT_COMPRESS = PDTS_COMPRESSED ' Compresses data without loss of any information.
  90. Global Const PDTT_DECOMPRESS = &H4000 ' Decompresses Data. Cannot be used in conjunction with other timing options.
  91. Global Const PDTT_ALL = (PDTT_PENINFO Or PDTT_UPPOINTS Or PDTT_OEMDATA Or PDTT_COLINEAR)
  92. Global Const MAXOEMDATAWORDS = 6
  93. Type STROKEINFO
  94. cPnts As Integer ' Count of points in stroke
  95. cbPnts As Integer ' Count of bytes used for stroke
  96. wPdk As Integer ' State of stroke
  97. dwTick As Long ' Time of stroke
  98. End Type
  99. Type OEMPENINFO
  100. wPdts As Integer
  101. wValMax As Integer
  102. wDistinct As Integer
  103. End Type
  104. Type PENINFO
  105. cxRawWidth As Integer ' Max x & width of tablet in 0.01 of inch
  106. cyRawHeight As Integer ' Max y & height of tablet " " " "
  107. wDistinctWidth As Integer ' Num of distinct X values returned by tablet
  108. wDistinctHieght As Integer ' Num of distinct Y values returned by tablet
  109. nSamplingRate As Integer ' Samples/second
  110. nSamplingDist As Integer ' Minimum distance moved in either direction
  111. lPdc As Long ' Pen Device capabilities
  112. cbOemData As Integer ' Width of OEM Packet
  113. rgoempeninfo(1 To MAXOEMDATAWORDS) As OEMPENINFO
  114. rgwReserved(1 To 8) As Integer
  115. End Type
  116. Global Const PDT_NULL = 0
  117. Global Const PDT_PRESSURE = 1
  118. Global Const PDT_HEIGHT = 2
  119. Global Const PDT_ANGLEXY = 3
  120. Global Const PDT_ANGLEZ = 4
  121. Global Const PDT_BARRELROTATION = 5
  122. Global Const PDT_OEMSPECIFIC = 16
  123. Global Const PDC_INTEGRATED = &H1
  124. Global Const PDC_PROXIMITY = &H2
  125. Global Const PDC_RANGE = &H4
  126. Global Const PDC_INVERT = &H8
  127. Global Const PDC_RELATIVE = &H10
  128. Global Const PDC_BARREL1 = &H20
  129. Global Const PDC_BARREL2 = &H40
  130. Global Const PDC_BARREL3 = &H80
  131. Declare Function DuplicatePenData Lib "penwin.dll" (ByVal hPenData As Integer, ByVal gMemFlags As Integer) As Integer
  132. Declare Function CompactPenData Lib "penwin.dll" (ByVal hPenData As Integer, ByVal wTrimOptions As Integer) As Integer
  133. Declare Function BeginEnumStrokes Lib "penwin.dll" (ByVal hPenData As Integer) As Long
  134. Declare Function GetPenDataInfo Lib "penwin.dll" (ByVal hPenData As Integer, lppendataheader As PENDATAHEADER, lppeninfo As Any, ByVal dwReserve As Long) As Integer
  135. 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
  136. 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
  137. Declare Function AddPointsPenData Lib "penwin.dll" (ByVal hPenData As Integer, lpPnt As Any, lpvOemData As Any, lpsiNew As Any) As Integer
  138. '====================================================================='
  139. '= Symbol Graph Structures ='
  140. '====================================================================='
  141. Global Const MAXHOTSPOT = 8
  142. '=== Symbol Character array =========================================='
  143. Type SYC
  144. wStrokeFirst As Integer
  145. wPntFirst As Integer
  146. wStrokeLast As Integer
  147. wPntLast As Integer
  148. fLastSyc As Integer
  149. End Type
  150. '=== Symbol Graph element ============================================'
  151. Type SYG
  152. rgpntHotSpotsArray(1 To MAXHOTSPOT) As POINTSHORT
  153. cHotSpot As Integer
  154. nFirstBox As Integer
  155. lRecogVal As Long
  156. lpSye As Long
  157. cSye As Integer
  158. lpSyc As Long
  159. cSyc As Integer
  160. End Type
  161. '=== Symbol Element =================================================='
  162. Type SYE
  163. Syv As Long
  164. lRecogVal As Long
  165. cl As Integer
  166. iSyc As Integer
  167. End Type
  168. '=== SYV values with special meanings to Windows For Pens
  169. Global Const SYV_NULL = &H0
  170. Global Const SYV_UNKNOWN = &H1
  171. Global Const SYV_EMPTY = &H3
  172. Global Const SYV_BEGINOR = &H10
  173. Global Const SYV_ENDOR = &H11
  174. Global Const SYV_OR = &H12
  175. Global Const SYV_SOFTNEWLINE = &H20
  176. Global Const SYV_SPACENULL = &H10000
  177. '=== SYV values for gestures
  178. Global Const SYV_CLEAR = &H2FFD5
  179. Global Const SYV_EXTENDSELECT = &H2FFD8
  180. Global Const SYV_UNDO = &H2FFD9
  181. Global Const SYV_COPY = &H2FFDA
  182. Global Const SYV_CUT = &H2FFDB
  183. Global Const SYV_PASTE = &H2FFDC
  184. Global Const SYV_CLEARWORD = &H2FFDD
  185. Global Const SYV_USER = &H2FFDE
  186. Global Const SYV_CORRECT = &H2FFDF
  187. Global Const SYV_BACKSPACE = &H20008
  188. Global Const SYV_TAB = &H20009
  189. Global Const SYV_RETURN = &H2000D
  190. Global Const SYV_SPACE = &H20020
  191. '=== Application Specific gestures circle a-z and circle A-Z
  192. Global Const SYV_APPGESTUREMASK = &H20000
  193. Global Const SYV_CIRCLEUPA = &H224B6
  194. Global Const SYV_CIRCLEUPZ = &H224CF
  195. Global Const SYV_CIRCLELOA = &H224D0
  196. Global Const SYV_CIRCLELOZ = &H224E9
  197. '=== SYV for Shapes (if recognizer installed)
  198. Global Const SYV_SHAPELINE = &H40001
  199. Global Const SYV_SHAPEELLIPSE = &H40002
  200. Global Const SYV_SHAPERECT = &H40003
  201. Global Const SYV_SHAPEMIN = SYV_SHAPELINE
  202. Global Const SYV_SHAPEMAX = SYV_SHAPERECT
  203. '=== To detect if SYV is a particular type, let SyvHi=(syv\&H10000)
  204. '=== Compare SyvHi with below
  205. Global Const SYVHI_SPECIAL = 0
  206. Global Const SYVHI_ANSI = 1
  207. Global Const SYVHI_GESTURE = 2
  208. Global Const SYVHI_KANJI = 3
  209. Global Const SYVHI_SHAPE = 4
  210. Global Const SYVHI_UNICODE = 5
  211. Global Const SYVHI_VKEY = 6
  212. '====================================================================='
  213. '= RcResult Structures ='
  214. '====================================================================='
  215. Type RCRESULT
  216. SYGraph As SYG
  217. wResultsType As Integer
  218. cSyv As Integer
  219. lpsyv As Long
  220. hSyv As Integer
  221. nBaseLine As Integer
  222. nMidLine As Integer
  223. hPenData As Integer
  224. rectboundink As RECTSHORT
  225. pntEnd As POINTSHORT
  226. lprc As Long
  227. End Type
  228. Global Const RCRT_DEFAULT = &H0
  229. Global Const RCRT_UNIDENTIFIED = &H1
  230. Global Const RCRT_GESTURE = &H2
  231. Global Const RCRT_NOSYMBOLMATCH = &H3
  232. Global Const RCRT_PRIVATE = &H4000
  233. Global Const RCRT_NORECOG = &H8000
  234. Global Const RCRT_ALREADYPROCESSED = &H8
  235. Global Const RCRT_GESTURETRANSLATED = &H10
  236. Global Const RCRT_GESTURETOKEYS = &H20
  237. Declare Function GetSymbolMaxLength Lib "penwin.dll" (lpsyg As Any) As Integer
  238. Declare Function GetSymbolCount Lib "penwin.dll" (lpsyg As Any) As Integer
  239. Declare Function SymbolToCharacter Lib "penwin.dll" (lpsyv As Any, ByVal cSyv As Any, ByVal lpstr As String, lpnCnvt As Any)
  240. '====================================================================='
  241. '= RC (Recognition Context) Definitions ='
  242. '====================================================================='
  243. Global Const CL_NULL = 0
  244. Global Const CL_MINIMUM = 1
  245. Global Const CL_MAXIMUM = 100
  246. Global Const INKWIDTH_MINIMUM = 0
  247. Global Const INKWIDTH_MAXIMUM = 15
  248. Global Const ENUM_MINIMUM = 1
  249. Global Const ENUM_MAXIMUM = 4096
  250. Global Const MAXDICTIONARIES = 16
  251. Type GUIDE
  252. xOrigin As Integer
  253. yOrigin As Integer
  254. cxBox As Integer
  255. cyBox As Integer
  256. cxBase As Integer
  257. cyBase As Integer
  258. cHorzBox As Integer
  259. cVertBox As Integer
  260. cyMid As Integer
  261. End Type
  262. Global Const cbRcLanguageMax = 44
  263. Global Const cbRcUserMax = 32
  264. Global Const cbRcrgbfAlcMax = 32
  265. Global Const cwRcReservedMax = 8
  266. Type RC ' Provided for Backward Compatibility Only
  267. hRec As Integer
  268. hWnd As Integer
  269. wEventRef As Integer
  270. wRcPreferences As Integer
  271. lRcOptions As Long
  272. lpfnYield As Long
  273. lpUser As String * cbRcUserMax
  274. wCountry As Integer
  275. wIntlPreferences As Integer
  276. lpLanguage As String * cbRcLanguageMax
  277. rglpdf(1 To MAXDICTIONARIES) As Long
  278. wTryDictinary As Integer
  279. clErrorLevel As Integer
  280. alc As Long
  281. alcPriority As Long
  282. rgbfAlc As String * cbRcrgbfAlcMax
  283. wResultMode As Integer
  284. wTimeOut As Integer
  285. lPcm As Long
  286. rectBound As RECTSHORT
  287. rectExclude As RECTSHORT
  288. guid As GUIDE
  289. wRcOrient As Integer
  290. wRcDirect As Integer
  291. nInkWidth As Integer
  292. rgbInk As Long
  293. dwAppParam As Long
  294. dwDictParam As Long
  295. dwRecognizer As Long
  296. rgwReserved(1 To cwRcReservedMax) As Integer
  297. End Type
  298. Declare Function InitRc Lib "penwin.dll" (ByVal hWnd As Integer, lpSrc As RC) As Integer
  299. Declare Function InstallRecognizer Lib "penwin.dll" (ByVal lpszRecogName As String) As Integer
  300. Declare Function UnInstallRecognizer Lib "penwin.dll" (ByVal hRec As Integer) As Integer
  301. Declare Function GetGlobalRC Lib "penwin.dll" (lprc As Any, ByVal lpDefRecog As String, ByVal lpDefRecog As String, ByVal cbDefDictMax As Integer) As Integer
  302. Declare Function SetGlobalRC Lib "penwin.dll" (lprc As Any, ByVal lpDefRecog As String, ByVal lpDefDict As String) As Integer
  303. Global Const GGRC_OK = 0
  304. Global Const GGRC_DICTBUFTOOSMALL = 1
  305. Global Const GGRC_PARAMERROR = 2
  306. Global Const SGRC_OK = &H0
  307. Global Const SGRC_USER = &H1
  308. Global Const SGRC_PARAMERROR = &H2
  309. Global Const SGRC_RC = &H4
  310. Global Const SGRC_RECOGNIZER = &H8
  311. Global Const SGRC_DICTIONARY = &H10
  312. Global Const SGRC_INIFILE = &H20
  313. '====================================================================='
  314. '= Training And Correcting ='
  315. '====================================================================='
  316. Declare Function TrainInk Lib "penwin.dll" (lprc As RC, ByVal hPenData As Integer, lpsyv As Any) As Integer
  317. 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
  318. 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
  319. Global Const CWR_STRIPCR = &H1
  320. Global Const CWR_STRIPLF = &H2
  321. Global Const CWR_STRIPTAB = &H4
  322. Global Const CWR_SINGLELINEEDIT = &H7
  323. Global Const CWR_TITLE = &H10
  324. '====================================================================='
  325. '= Other Windows For Pens API's ='
  326. '====================================================================='
  327. Declare Function BoundingRectFromPoints Lib "penwin.dll" (lpPnt As Any, ByVal cPnt, lprectBound As RECTSHORT) As Integer
  328. Declare Function TPtoDP Lib "penwin.dll" (lpPnts As Any, ByVal cPnts As Integer) As Integer
  329. Declare Function DPtoTP Lib "penwin.dll" (lpPnts As Any, ByVal cPnts As Integer) As Integer
  330. Declare Function DrawPenData Lib "penwin.dll" (ByVal hDC As Integer, lpRect As RECTSHORT, ByVal hPenData As Integer) As Integer
  331. Declare Function MetricScalePenData Lib "penwin.dll" (ByVal hPenData As Integer, ByVal wPdts) As Integer
  332. Declare Function OffsetPenData Lib "penwin.dll" (ByVal hPenData As Integer, ByVal dx As Integer, ByVal dy As Integer) As Integer
  333. Declare Function RecognizePenData Lib "penwin.dll" (lprc As RC, ByVal hPenData As Integer) As Integer
  334. Declare Function CreatePenData Lib "penwin.dll" (lppenifo As PENINFO, ByVal cbOemData As Integer, ByVal wPdtScal As Integer, ByVal gMemFlags As Integer) As Integer
  335. Declare Function ExecuteGesture Lib "penwin.dll" (ByVal hWnd As Integer, ByVal Syv As Long, lprcResult As RC)
  336. '=== Message Routines Constants ======================================'
  337. Global Const WM_PENWINFIRST = &H380 'Main Offset for Pen messages
  338. Global Const WM_RCRESULT = WM_PENWINFIRST + 1
  339. Global Const WM_HOOKRCRESULT = WM_PENWINFIRST + 2
  340. Global Const WM_GLOBALRCCHANGE = WM_PENWINFIRST + 3
  341. Global Const WM_SKB = WM_PENWINFIRST + 4
  342. Global Const WM_HEDITCTL = WM_PENWINFIRST + 5 'Configures HEdits and BEdits
  343. '== The constants below are used as wParam with WM_HEDITCTL message
  344. Global Const HE_GETRC = 3
  345. Global Const HE_SETRC = 4
  346. Global Const HE_GETINFLATE = 5
  347. Global Const HE_SETINFLATE = 6
  348. Global Const HE_GETUNDERLINE = 7
  349. Global Const HE_SETUNDERLINE = 8
  350. Global Const HE_GETINKHANDLE = 9
  351. Global Const HE_SETINKMODE = 10
  352. Global Const HE_STOPINKMODE = 11
  353. Global Const HE_GETRCRESULTCODE = 12
  354. Global Const HE_DEFAULTFONT = 13
  355. Global Const HE_CHARPOSITION = 14
  356. Global Const HE_CHAROFFSET = 15
  357. Global Const HE_GETRCRESULT = 22
  358. '====================================================================='
  359. '= END WINDOWS FOR PENS API ='
  360. '====================================================================='
  361. '====================================================================='
  362. '= PENCNTRL.VBX Constants and Function Declarations ='
  363. '====================================================================='
  364. '== Property Settings =============================================='
  365. ' AutoSize Property: IEdit control
  366. Global Const PEN_AUTOSIZE_NONE = 0 ' No AutoSizing occurs
  367. Global Const PEN_AUTOSIZE_STRETCHBITMAP = 1 ' Stretch Bitmap to fit Window
  368. Global Const PEN_AUTOSIZE_SIZEWINDOW = 2 ' Size Window to fit Bitmap
  369. Global Const PEN_AUTOSIZE_TILE = 3 ' Tile Bitmap
  370. Global Const PEN_AUTOSIZE_CENTER = 4 ' Center Bitmap
  371. ' BorderStyle Property: BEdit, HEdit, and IEdit controls
  372. Global Const PEN_BORDERSTYLE_NONE = 0 ' No Border
  373. Global Const PEN_BORDERSTYLE_SINGLE = 1 ' Single Line Border
  374. Global Const PEN_BORDERSTYLE_UNDERLINE = 2 ' Underline: Valid for HEdit only
  375. ' BoxCross Property: BEdit control only
  376. Global Const PEN_BOXCROSS_OFF = 0 ' BoxCross not displayed
  377. Global Const PEN_BOXCROSS_ON = 1 ' BoxCross displayed
  378. ' CombStyle Property: BEdit control only
  379. Global Const PEN_COMBSTYLE_COMB = 0 ' Comb Style
  380. Global Const PEN_COMBSTYLE_BOX = 1 ' Box Style
  381. ' FormatAttrb Property: IEdit control only
  382. Global Const PEN_FORMATATTRB_COLOR = 0 ' Set Stroke Color
  383. Global Const PEN_FORMATATTRB_WIDTH = 1 ' Set Stroke Width
  384. Global Const PEN_FORMATATTRB_BOTH = 2 ' Set both Stroke Color & Width
  385. ' FormatItem Property: IEdit control only
  386. Global Const PEN_FORMATITEM_ALL = 0 ' Set Attributes for All Strokes
  387. Global Const PEN_FORMATITEM_SELECTION = 1 ' Set Attributes for Selected Strokes
  388. Global Const PEN_FORMATITEM_INDEX = 2 ' Set Attributes for Stroke specified by StrokeIndex
  389. ' GestureSet Property: BEdit and HEdit controls
  390. Global Const PEN_GESTURESET_SELECTION = &H1 ' Selection and Lasso
  391. Global Const PEN_GESTURESET_CLIPBOARD = &H2 ' Cut, Copy, Paste
  392. Global Const PEN_GESTURESET_WHITECHARS = &H4 ' Space, Tab, Return
  393. Global Const PEN_GESTURESET_EDIT = &H10 ' Insert, Correct, Undo
  394. Global Const PEN_GESTURESET_CIRCLELOWER = &H100 ' Lowercase Circle Gestures
  395. Global Const PEN_GESTURESET_CIRCLEUPPER = &H200 ' Uppercase Circle Gestures
  396. ' hInkGet/hInkSet Properties: IEdit control only
  397. Global Const PEN_HINKGET_ALL = 0 ' Get all the Ink in the IEdit
  398. Global Const PEN_HINKGET_SELECTION = 1 ' Get only the selected Ink
  399. ' InkDataMode Property: BEdit, HEdit, and IEdit controls
  400. Global Const PEN_INKDATAMODE_REPLACE = 0 ' Existing Ink is replaced when new Ink is assigned to InkDataString
  401. Global Const PEN_INKDATAMODE_APPEND = 1 ' New ink is appended to existing Ink
  402. ' InkingMode Property: IEdit control only
  403. Global Const PEN_INKINGMODE_READY = 0 ' Ready Mode
  404. Global Const PEN_INKINGMODE_ERASE = 1 ' Erasing Mode for erasing Ink
  405. Global Const PEN_INKINGMODE_LASSO = 2 ' Lasso Selection Mode
  406. ' InkInput Property: IEdit control only
  407. Global Const PEN_INKINPUT_MOVE = 1 ' Ink will be Moved into IEdit
  408. Global Const PEN_INKINPUT_RESIZE = 2 ' Ink will be Resized to fit in IEdit
  409. Global Const PEN_INKINPUT_CROP = 4 ' Ink drawn outside IEdit will be cropped
  410. Global Const PEN_INKINPUT_DISCARD = 8 ' Ink will be discarded if any part of stroke is outside of IEdit
  411. ' InkWidth Property: BEdit, HEdit, and IEdit controls
  412. Global Const PEN_INKWIDTH_DEFAULT = -1 ' Use system default Ink Width
  413. Global Const PEN_INKWIDTH_MIN = 0 ' Minimum Valid size; no Ink is displayed
  414. Global Const PEN_INKWIDTH_MAX = 15 ' Maximum Valid Ink Width (in Pixels)
  415. ' Recog Property: IEdit control only
  416. Global Const PEN_RECOG_NONE = 0 ' No Recognition
  417. Global Const PEN_RECOG_GESTURES = 1 ' Recognize Gestures Only
  418. Global Const PEN_RECOG_ALL = 2 ' Recognize All
  419. ' ScrollBars Property: BEdit and HEdit controls
  420. Global Const PEN_SCROLLBARS_NONE = 0 ' No ScrollBars
  421. Global Const PEN_SCROLLBARS_HORIZONTAL = 1 ' Horizontal ScrollBar: Not Valid for BEdit
  422. Global Const PEN_SCROLLBARS_VERTICAL = 2 ' Vertical ScrollBar
  423. Global Const PEN_SCROLLBARS_BOTH = 3 ' Both ScrollBars: Valid for HEdit only
  424. ' Security Property: IEdit control only
  425. Global Const PEN_SECURITY_NOCOPY = &H1 ' Disable Copying Ink
  426. Global Const PEN_SECURITY_NOCUT = &H2 ' Disable Cutting Ink
  427. Global Const PEN_SECURITY_NOPASTE = &H4 ' Disable Pasting Ink
  428. Global Const PEN_SECURITY_NOUNDO = &H8 ' Disable Undo action
  429. Global Const PEN_SECURITY_NOINK = &H10 ' Disable Inking
  430. Global Const PEN_SECURITY_NOERASE = &H20 ' Disable Erasing Ink
  431. Global Const PEN_SECURITY_NOGET = &H40 ' Disable reading hInk property
  432. Global Const PEN_SECURITY_NOSET = &H80 ' Disable writing hInk property
  433. '== Trappable Error Strings ========================================'
  434. Global Const PENERR_INKWIDTH = 32001 ' InkWidth must be in range 0-15 or -1 for default
  435. Global Const PENERR_NEGCELLWIDTH = 32002 ' CellWidth must be greater than 0
  436. Global Const PENERR_CELLWIDTH = 32003 ' CellWidth must be greater than or equal to CombSpacing*2
  437. Global Const PENERR_NEGCELLHEIGHT = 32004 ' CellHeight must be greater than 0
  438. Global Const PENERR_CELLHEIGHT = 32005 ' CellHeight must be greater than or equal to CombBaseLine
  439. Global Const PENERR_COMBSPACING = 32006 ' CombSpacing out of range (0 - CellWidth/2)
  440. Global Const PENERR_COMBBASELINE = 32007 ' CombBaseLine out of range (0 - CellHeight)
  441. Global Const PENERR_BIGCOMBBASELINE = 32008 ' CombBaseLine must be greater than or equal to CombHeight and CombEndHeight
  442. Global Const PENERR_COMBHEIGHT = 32009 ' CombHeight out of range (0 - CombBaseLine)
  443. Global Const PENERR_COMBENDHEIGHT = 32010 ' CombEndHeight our of range (0 - CombBaseLine)
  444. Global Const PENERR_INFLATE = 32011 ' Inflate value must be greater than or equal to 0
  445. Global Const PENERR_INVALIDPICTURE = 32012 ' Picture format not supported
  446. Global Const PENERR_DISPLAYFAILED = 32013 ' Unable to display bitmap
  447. Global Const PENERR_AUTOSIZEHW = 32014 ' Cannot change Height or Width while AutoSize equals 2
  448. Global Const PENERR_MERGEFAILED = 32015 ' Unable to merge ink data
  449. Global Const PENERR_INVALIDINKDATA = 32016 ' Invalid InkDataString format
  450. '== Functions Declarations ========================================='
  451. Declare Sub VBTypeToCPointer Lib "pencntrl.vbx" (lpSrc As Any, ByVal lpDest As Long, ByVal cb As Integer)
  452. Declare Sub CPointerToVBType Lib "pencntrl.vbx" (ByVal lpSrc As Long, lpDest As Any, ByVal cb As Integer)
  453. '====================================================================='