home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c480 / 18.ddi / PEN / README.TX_ / README.TX
Encoding:
Text File  |  1993-02-08  |  15.8 KB  |  424 lines

  1. README.TXT - Microsoft Windows for Pen Computing Files
  2.  
  3. This file contains the following information regarding building
  4. Microsoft Windows for Pen Computing applications:
  5.  
  6. I.   Introduction
  7. II.  Hardware Requirements and Basic Limitations
  8. III. Installation Notes and Procedures
  9. IV.  Shipping PENWIN.DLL with your application
  10. V.   Release Notes
  11.  
  12.  
  13. I.  Introduction
  14. ================
  15.  
  16. The Windows SDK contains sufficient components from Windows for
  17. PenComputing to allow the application designer to build and test
  18. pen applications. The Microsoft Mouse can be used to get a rough
  19. idea of how recognition and a pen will work.
  20.  
  21. However, it is STRONGLY recommended that Windows for Pen
  22. Computing hardware in the form of a computer or peripheral device
  23. be used during the design and development process.  This is
  24. critical because a pen gives the application designer an accurate
  25. feeling for how an application will work in real situations AND
  26. because the Microsoft Alphanumeric Recognition System shipped
  27. with the SDK has been optimized for a pen and will work less well
  28. with a mouse.
  29.  
  30.  
  31. II.  Hardware Requirements and Basic Limitations
  32. ================================================
  33.  
  34.    1. A driver for the Microsoft Mouse has been provided so that
  35.       simple testing of pen functionalities can be done. This pen
  36.       driver is called MSMOUSE.DRV.
  37.  
  38.    2. At this time, only VGA displays can be used with the pen
  39.       extensions. The VGAP.DRV display driver is a modified
  40.       version of the VGA.DRV that supports inking.  It is
  41.       required if the pen functionalities are to be tested.
  42.  
  43.    3. Handwriting recognition with the Microsoft Mouse will
  44.       achieve poor results in comparison to digitizer hardware
  45.       designed specifically for Pen Computing.  The recognizer
  46.       has been designed to work with pen computers and
  47.       peripherals with true digitizer input and its associated
  48.       high data rates and high data resolution.
  49.  
  50.     4. The spell checking technology included in Windows for Pens may
  51.       be used exclusively for the purpose of improving handwriting 
  52.       recognition.  It is not to be used by applications as a spell
  53.       checker or spelling corrector.
  54.       
  55.  
  56.  
  57. III. Installation Notes and Procedures  (***** READ THIS *****)
  58. ===============================================================
  59.  
  60. Installing the Pen Components - Minimum
  61. ---------------------------------------
  62. This procedure will result in a system that will let you build
  63. applications that contain hedit and bedit controls - and call any
  64. of the Windows for Pen Computing APIs.  You will not be able to
  65. perform handwriting recognition or see ink on the screen.
  66.  
  67. SYSTEM.INI Changes
  68.  
  69. The following items must be added or changed in your SYSTEM.INI
  70. file so that the pen extensions will work. NOTE: BACK UP YOUR OLD
  71. SYSTEM.INI file before proceeding.
  72.  
  73. 1.  In the "[boot]" section:
  74.  
  75.     a.  Add "penwindows" to the list of drivers after the
  76.        "drivers=" key. For example:
  77.  
  78.          drivers=mmsystem.dll penwindows
  79.  
  80. 2. In the "[Drivers]" section:
  81.  
  82.     a. Add a new item "penwindows" and set it equal to the path
  83.        to PENWIN.DLL.  For example:
  84.  
  85.          penwindows=C:\MSVC\REDIST\PENWIN.DLL
  86.  
  87. When Windows is restarted PENWIN.DLL will be loaded as an
  88. installed driver and you will be able to run applications
  89. containing bedit and hedit controls and call the Windows for Pen
  90. Computing APIs.
  91.  
  92. Installing the Pen Components - Complete
  93. ----------------------------------------
  94. This procedure will result in a system that will run pen
  95. applications and allow you to experiment with handwriting
  96. recognition and inking functionalities in your applications. Once
  97. again, interaction with the mouse will prove inferior in every
  98. respect to interaction with a true pen device - but this system
  99. of using the special mouse driver will allow you to experiment
  100. and perform rudimentary testing of your pen functionalities.
  101.  
  102. SYSTEM.INI Changes
  103.  
  104. The following items must be added or changed in your SYSTEM.INI
  105. file so that the pen extensions will work. NOTE: BACK UP YOUR OLD
  106. SYSTEM.INI file before proceeding.
  107.  
  108. 1.  In the "[boot]" section:
  109.  
  110.     a. Change the "display.drv=" line so that the display driver
  111.        is the pen capable VGAP.DRV shipped with the Windows SDK.
  112.        For example:
  113.  
  114.             display.drv=C:\MSVC\PEN\VGAP.DRV
  115.  
  116.        Note:  Only the VGA display device is supported by the pen
  117.        components in the Windows SDK.
  118.  
  119.     b. Add "pen penwindows" to the list of drivers after the
  120.        "drivers=" key. For example:
  121.  
  122.          drivers=mmsystem.dll pen penwindows
  123.  
  124.     c. Change the "mouse.drv=" line so that it points to
  125.        YESMOUSE.DRV. For example:
  126.  
  127.          mouse.drv=C:\MSVC\PEN\YESMOUSE.DRV
  128.  
  129. 2. In the "[Drivers]" section:
  130.  
  131.     a. Add a new item "pen" and set it equal to the path to
  132.        MSMOUSE.DRV. For example:
  133.  
  134.           pen=C:\MSVC\PEN\MSMOUSE.DRV
  135.  
  136.     b. Add a new item "penwindows" and set it equal to the path
  137.        to PENWIN.DLL.  For example:
  138.  
  139.           penwindows=C:\MSVC\REDIST\PENWIN.DLL
  140.  
  141. 3.  PENWIN.INI Changes
  142.  
  143. The PENWIN.INI file contains a number of initialization settings
  144. for Windows for Pen Computing.
  145.  
  146. There are also two explicit paths that must correctly identify
  147. the locations of MARS.DLL and MARS.MOB.  The Windows SDK
  148. installation procedure did not update these paths for users who
  149. chose to install to a directory other than the default.  As this
  150. is the case, you need to update them by hand.
  151.  
  152. Open PENWIN.INI with any generic text editor (like Windows
  153. Notepad) and change the path to MARS.DLL so that it correctly
  154. identifies points to the current MARS.DLL location.  Do the same
  155. for MARS.MOB.
  156.  
  157. Once the paths are correct, the file should be copied to the
  158. Windows 3.1 root - that is, the directory containing the Windows
  159. 3.1 WIN.COM.
  160.  
  161.  
  162. IV.  Shipping PENWIN.DLL with your application
  163. ==============================================
  164.  
  165. PENWIN.DLL is a fully redistributable component of Windows for
  166. Pen Computing.  Because applications will seek to leverage the
  167. Pen API - hedit and bedit controls in particular - PENWIN.DLL can
  168. be shipped with your application.  There are some considerations
  169. to keep in mind in shipping PENWIN.DLL with your application:
  170.  
  171. 1.  PENWIN.DLL functions ONLY under Windows 3.1.  It WILL NOT
  172.     WORK with Windows 3.0 because it functions only as an
  173.     installable device driver - a feature not present in Windows
  174.     3.0.
  175.  
  176. 2.  As with other redistributable components such as COMMDLG.DLL
  177.     and the OLE libraries, it is the responsibility of the
  178.     application vendor to determine whether PENWIN.DLL has
  179.     already been installed (there is a GetSystemMetrics() call
  180.     for this) and to ensure that the version of PENWIN.DLL with
  181.     the latest version stamping is the one that is running. These
  182.     issues are the same for all redistributable components, and
  183.     further information is contained elsewhere in this SDK.
  184.  
  185. 3.  Unlike some of the other redistributable components, if your
  186.     application installs PENWIN.DLL for the first time, or
  187.     replaces the current version with a later one, Windows will
  188.     have to be restarted.  As an installable driver PENWIN.DLL
  189.     can be loaded only at Windows boot time.  Restarting Windows
  190.     can be accomplished via an ExitWindows() call or by simply
  191.     prompting the user to do so.
  192.  
  193.     Note:  To install PENWIN.DLL on a Windows 3.1 system follow
  194.        the "Minimum" procedure listed above.
  195.  
  196. 4. PENWIN.DLL may be in either the \WINDOWS or the
  197.    \WINDOWS\SYSTEM directory.  The default will be \WINDOWS but
  198.    since Windows for Pen Computing is an OEM product. Microsoft
  199.    cannot completely control where PENWIN.DLL is located on a
  200.    particular machine.
  201.  
  202. V.  Release Notes
  203. =================
  204.  
  205. Release Notes for the Microsoft(R) Windows for Pen Computing
  206. Programmer's Reference, version 1.00 (C) Copyright 1992 Microsoft
  207. Corporation.
  208.  
  209. This section contains release notes for version 1.00 of the
  210. Microsoft(R) Windows for Pen Computing Programmer's Reference.
  211. The information in this section is more current than the
  212. information in the manual.  Where this file conflicts with
  213. printed documentation, you should assume that this file is
  214. correct.
  215.  
  216. Microsoft revises its documentation at the time of reprinting;
  217. the manuals and online help files may already include some of
  218. this information.
  219.  
  220. Hedits - Delayed recogntion mode
  221. -----------------------
  222. Setting focus in hedit causes any text in the control to appear
  223. even if the control is in "ink" mode.  If this is undesireable
  224. the control should never be allowed to get the focus.
  225.  
  226. Sending an hedit the WM_HEDITCTL message with the HE_SETINKMODE
  227. parameter will clear the hedit's text buffer.  The same message to a 
  228. bedit will preserve the control's text contents.
  229.  
  230. PostVirtualMouseEvent
  231. ---------------------
  232. Values greater than the maximum resolution in X direction
  233. (usually 640) and max resoultion Y direction (usually 480) will
  234. overflow.
  235.  
  236. ALC_USEBITMAP
  237. -------------
  238. The Microsoft recognizer does not implement ALC_USEBITMAP in the
  239. alcPriority field for version 1.0. Note that alcPriority is
  240. implemented for the alc field.
  241.  
  242. ProcessWriting
  243. --------------
  244. In the description of ProcessWriting, it says "The window
  245. specified by the hwnd parameter receives a WM_PARENTNOTIFY
  246. message when ProcessWriting destroys its inking window."
  247.  
  248. The window never gets the WM_PARENTNOTIFY message since it is not
  249. guaranteed that an inking window is created.
  250.  
  251. Microsoft User Dictionary DLL
  252. -----------------------------
  253. The documentation incorrectly states that up to 16 dictionaries
  254. can be loaded.
  255.  
  256. MSSPELL.DLL actually allows only six wordlists to be loaded.
  257. Consequently, version 1.00 of the Microsoft User Dictionary DLL
  258. allows only six wordlists to be loaded at a time.
  259.  
  260. WM_HEDITCTL HE_CHAROFFSET
  261. -------------------------
  262. Under the documentation for WM_HEDITCTL messages, under
  263. HE_CHAROFFSET, it says "See the related HE_CHAROFFSET".  It
  264. should say "See the related HE_CHARPOSITION".
  265.  
  266. WM_SKB Message
  267. --------------
  268. When the state of the SKB changes, a WM_SKB message is posted.
  269. The documentation says that the LOWORD of the lParam contains
  270. information on what changed and that the HIWORD contains the
  271. window handle of the SKB.
  272.  
  273. Actually, the LOWORD contains the hWnd and the HIWORD contains
  274. the information on what changed.
  275.  
  276. This should be corrected in two places: in the ShowKeyboard
  277. function and in the WM_SKB message documentation.
  278.  
  279. Also, one more value should be mentioned: the HIWORD of lParam
  280. contains SKN_TERMINATED (value 0xffff) if the keyboard has been
  281. closed.
  282.  
  283. SKN_TERMINATED
  284. --------------
  285. WM_SKB sends SKN_TERMINATED in HIWORD(lParam) when terminating
  286. SKN_TERMINATED (0xffff) is sent in the HIWORD(lParam) when the
  287. WM_SKB is sent to notify top-level windows that the On-Screen
  288. Keyboard is being terminated.  This needs to be added to the
  289. documentation for the WM_SKB message and for the ShowKeyboard
  290. function.
  291.  
  292. REC_DEBUG
  293. ---------
  294. In _Guide_to_Pen_Programming_ Chapter 11 Pen Messages and
  295. Constants, Under REC_ Values, Under Debugging Values, it says:
  296.  
  297. "REC_DEBUG   All debugging return values are less than this."
  298.  
  299. It should say:
  300.  
  301. "REC_DEBUG   All debugging return values are less than or equal
  302. to this."
  303.  
  304. clErrorLevel
  305. ------------
  306. The documentation for the RC field clErrorLevel says that this
  307. value can range from 0 to 100.  In the PENWIN.H file, the minimum
  308. CL value is defined as
  309.  
  310.     #define CL_MINIMUM 1
  311.  
  312. The correct minimum for clErrorLevel is 1
  313.  
  314. Dictionary Searches
  315. -------------------
  316. The documentation is somewhat confusing on the point of
  317. dictionary enumeration procedures in chapter 7, page 103.  To
  318. expound:
  319.  
  320. If there are ten dictionaries in the dictionary path, and the
  321. ninth finds a match for a particular enumeration in a symbol
  322. graph, the remaining symbol graph elements will STILL be
  323. enumerated - checking for a match in a higher-order dictionary.
  324. In other words, the other eight dictionaries before the ninth
  325. dictionary in the list will get a shot at finding a "better"
  326. match.  Enumeration of dictionaries therefore can be said to stop
  327. only when the symbol graph is exausted, or the first dictionary
  328. in the list responds affirmatively to a query.
  329.  
  330.  
  331. Documentation Clarification - rc.RectBound
  332. ------------------------------------------
  333. Here is additional detail on the rectBound element of the RC
  334. structure.
  335.  
  336. rc.rectBound will be ignored if PCM_RECTBOUND is not set.  The
  337. documentation suggests on page 237 that rc.lPcm = PCM_RECTBOUND
  338. only determines how the recognition context will end.
  339.  
  340. Documentation incorrect:  DRV_SetSamplingDist
  341. ---------------------------------------------
  342. pg. 226 chapter 10 - PENINFO structure:  
  343.  
  344. In the notes after nSamplingRate and nSamplingDist, the driver
  345. messages that manipulate these fields are misnamed.  In the
  346. printed documentation, they are named DRV_SetSamplingDist and
  347. DRV_SetSamplingRate; they are actually DRV_SetPenSamplingDist and
  348. DRV_SetPenSamplingRate.
  349.  
  350. RecognizeData and Ink:  Clarification
  351. --------------------------------------
  352. Calls to RecognizeData may return an rcresult that references
  353. pendata different than that used as a Parameter to the call.  For
  354. example, Strokes may be removed and the rgbInk and nInkWidth
  355. fields of the PENDATAHEADER may not match the values in the
  356. original pendata, as no inking has taken place during this
  357. recognition context.
  358.  
  359. List of characters effected by ALC_PUNC
  360. ---------------------------------------
  361. On page 253 of the documentation, the list of chars in ALC_PUNC
  362. has two semicolons; one of these should be a colon.
  363.  
  364. DLLs that use hedit and bedit controls take note!
  365. -------------------------------------------------
  366. Any DLL which creates an hedit or bedit control must have a non-0
  367. heap size.  This is because those controls allocate buffers out
  368. of this heap.
  369.  
  370. Dictionary and Recognizer ISVs:  When Windows ends
  371. --------------------------------------------------
  372. When a Windows session is about to end, PENWIN.DLL takes the
  373. following actions:
  374.  
  375. 1) Calls all the dictionaries in the global recognition context
  376.    with a DIRQ_CLEANUP message and then frees the corresponding
  377.    DLLs.
  378.  
  379. 2) Calls the CloseRecognizer function for the current recognizer
  380.    and frees the corresponding DLL.
  381.  
  382. Dictionaries and recognizers can take the appropriate cleanup
  383. action at this time. The limitations on things that can be done
  384. are the same as those when an application receives a
  385. WM_ENDSESSION message.
  386.  
  387. Expense Sample May Require .INI settings
  388. ----------------------------------------
  389. When running the Expense sample app, to get the custom word lists
  390. loaded, one of the following two conditions must be true:
  391.  
  392. 1) NAMES.DIC and DEPTNAME.DIC must be in the same directory as
  393.    USERDICT.DLL.
  394.  
  395. or
  396.  
  397. 2) The following lines must be added to PENWIN.INI to point the
  398.    word lists
  399.  
  400.     [Expense]
  401.     namedict=c:\msvc\samples\expense\names.dic
  402.     deptnamedict=c:\msvc\samples\expense\deptname.dic
  403.  
  404. SetAlcBitGesture, ResetAlcBitGesture, IsAlcBitGesture Removed
  405. -------------------------------------------------------------
  406. The Windows for Pen Computing Programmer's Reference refers to
  407. the above macros.  They have been removed because the ability to
  408. set alc bits for gestures was not implemented.
  409.  
  410. REC_ error values from Recognize()
  411. ----------------------------------
  412. In the documentation for Recognize API and REC_ values in chapter
  413. 11, there is a Debugging values section.  There is a sentence
  414. that reads: "All of the values listed in the following table are
  415. in debug version only."  That sentence should be replaced with
  416. the following: "All of the values below are providing for
  417. debugging information.  A well-behaved application should not
  418. specify an RC which causes any of these values to be returned."
  419.  
  420. DIRQ_SUGGEST not implemented
  421. ----------------------------
  422. In version 1.0 of Windows for Pens, the dictionary shipped with the system
  423. does not support DIRQ_SUGGEST.
  424.