home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_144 / 5.ddi / DOC.ZIP / WINPEN.DOC < prev    next >
Encoding:
Text File  |  1992-06-10  |  23.2 KB  |  634 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6. CONTENTS
  7. ___________________________________________________________________________
  8.  
  9.  
  10.  
  11.  
  12.  
  13. Introduction . . . . . . . . . . . 1     WM_HEDITCTL and HE_CHAROFFSET .  6
  14. Hardware requirements and basic          WM_SKB message  . . . . . . . .  7
  15. limitations  . . . . . . . . . . . 1     SKN_TERMINATED  . . . . . . . .  7
  16. Installation notes and                   REC_DEBUG . . . . . . . . . . .  7
  17. procedures . . . . . . . . . . . . 2     clErrorLevel  . . . . . . . . .  8
  18.   Installing the pen components--        Dictionary searches . . . . . .  8
  19.   minimum  . . . . . . . . . . . . 2     rc.RectBound  . . . . . . . . .  8
  20.     SYSTEM.INI changes . . . . . . 2     DRV_SetSamplingDist . . . . . .  9
  21.   Installing the pen COMPONENTS--        RecognizeData and ink . . . . .  9
  22.   complete . . . . . . . . . . . . 2     List of characters effected by
  23.     SYSTEM.INI changes . . . . . . 3     ALC_PUNC  . . . . . . . . . . .  9
  24.     PENWIN.INI changes . . . . . . 4     DLLs that use hedit and bedit
  25. Shipping PENWIN.DLL with your            controls  . . . . . . . . . . .  9
  26. application  . . . . . . . . . . . 4     Dictionary and recognizer ISVs:
  27. Release notes  . . . . . . . . . . 5     When Windows ends . . . . . . .  9
  28.   Hedits--delayed recogntion             SetAlcBitGesture,
  29.   mode . . . . . . . . . . . . . . 5     ResetAlcBitGesture, and
  30.   PostVirtualMouseEvent  . . . . . 6     IsAlcBitGesture removed . . . . 10
  31.   ALC_USEBITMAP  . . . . . . . . . 6     REC_ error values from Recognize
  32.   ProcessWriting . . . . . . . . . 6       . . . . . . . . . . . . . . . 10
  33.   Microsoft user dictionary DLL  . 6     DIRQ_SUGGEST not implemented  . 10
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.                                      i
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64. ===========================================================================
  65. Introduction
  66. ===========================================================================
  67.  
  68.                     Borland C++ contains sufficient components from Windows
  69.                     for Pen Computing to let you to build and test pen
  70.                     applications. A mouse can be used to get a rough idea
  71.                     of how recognition and a pen will work.
  72.  
  73.                     However, we strongly recommended that you use Windows
  74.                     for Pen Computing hardware (a pen, for example) during
  75.                     the design and development process. This is critical
  76.                     because a pen gives you an accurate feel for how an
  77.                     application will work in real situations and because
  78.                     the Microsoft Alphanumeric Recognition System (MARS)
  79.                     shipped with Borland C++ has been optimized for a pen
  80.                     and won't work as well with a mouse.
  81.  
  82.  
  83.  
  84. ===========================================================================
  85. Hardware requirements and basic limitations
  86. ===========================================================================
  87.  
  88.                     1. A driver for Microsoft-compatible mice has been
  89.                        provided so you can do simple testing of pen
  90.                        functionality. This pen driver is called
  91.                        MSMOUSE.DRV.
  92.  
  93.                     2. At this time, only VGA displays can be used with the
  94.                        pen extensions. The VGAP.DRV display driver is a
  95.                        modified version of the VGA.DRV that supports
  96.                        inking. It's required if you want to test pen
  97.                        functionalities.
  98.  
  99.                     3. Handwriting recognition with a mouse will be much
  100.                        less accurate than with digitizer hardware designed
  101.                        specifically for Pen Computing. The recognizer has
  102.                        been designed to work with pen computers and
  103.                        peripherals with true digitizer input and its
  104.                        associated high data rates and high data resolution.
  105.  
  106.                     4. The spell checking technology included in Windows
  107.                        for Pens must be used exclusively for the purpose of
  108.                        improving handwriting recognition. It is not to be
  109.                        used by applications as a spell checker or spelling
  110.                        corrector.
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117. ===========================================================================
  118. Installation notes and procedures
  119. ===========================================================================
  120.  
  121.  
  122.  
  123. Installing the pen  =======================================================
  124.       components--
  125.            minimum  This procedure will result in a system that will let
  126.                     you build applications that contain hedit and bedit
  127.                     controls--and call any Windows for Pen Computing API
  128.                     functions. You will not be able to perform handwriting
  129.                     recognition or see ink on the screen.
  130.  
  131.  
  132. ------------------  The following items must be added or changed in your
  133. SYSTEM.INI changes  SYSTEM.INI file so that the pen extensions will work.
  134. ------------------
  135.              Note!  Back up your old SYSTEM.INI file before proceeding.
  136.  
  137.                     1. In the "[boot]" section:
  138.  
  139.                        a. Add "penwindows" to the list of drivers after the
  140.                           "drivers=" key. For example:
  141.  
  142.                           drivers=mmsystem.dll penwindows
  143.  
  144.                     2. In the "[Drivers]" section:
  145.  
  146.                        a. Add a new item "penwindows" and set it equal to
  147.                           the path to PENWIN.DLL. For example:
  148.  
  149.                           penwindows=C:\BORLANDC\REDIST\PENWIN.DLL
  150.  
  151.                     When Windows is restarted PENWIN.DLL will be loaded as
  152.                     an installed driver and you will be able to run
  153.                     applications containing bedit and hedit controls and
  154.                     call the Windows for Pen Computing APIs.
  155.  
  156.  
  157. Installing the pen  =======================================================
  158.       COMPONENTS--
  159.           complete  This procedure will result in a system that will run
  160.                     pen applications and allow you to experiment with
  161.                     handwriting recognition and inking functionalities in
  162.                     your applications. Once again, interaction with the
  163.                     mouse will prove inferior in every respect to
  164.                     interaction with a true pen device--but this system of
  165.  
  166.  
  167.  
  168.                                    - 2 -
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.                     using the special mouse driver will allow you to
  176.                     experiment and perform rudimentary testing of your pen
  177.                     functionalities.
  178.  
  179.  
  180. ------------------  The following items must be added or changed in your
  181. SYSTEM.INI changes  SYSTEM.INI
  182. ------------------  file so that the pen extensions will work.
  183.  
  184.              Note!  Back up your old SYSTEM.INI file before proceeding.
  185.  
  186.                     1. In the "[boot]" section:
  187.  
  188.                        a. Change the "display.drv=" line so that the
  189.                           display driver is the pen capable VGAP.DRV
  190.                           shipped with Borland C++. For example:
  191.  
  192.                              display.drv=C:\BORLANDC\REDIST\VGAP.DRV
  193.  
  194.                           Only the VGA display device is supported by the
  195.                           pen components in Borland C++.
  196.  
  197.                        b. Add "pen penwindows" to the list of drivers after
  198.                           the "drivers=" key. For example:
  199.  
  200.                           drivers=mmsystem.dll pen penwindows
  201.  
  202.                        c. Change the "mouse.drv=" line so that it points to
  203.                           YESMOUSE.DRV. For example:
  204.  
  205.                           mouse.drv=C:\BORLANDC\REDIST\YESMOUSE.DRV
  206.  
  207.                     2. In the "[Drivers]" section:
  208.  
  209.                        a. Add a new item "pen" and set it equal to the path
  210.                           to MSMOUSE.DRV. For example:
  211.  
  212.                           pen=C:\BORLANDC\REDIST\MSMOUSE.DRV
  213.  
  214.                        b. Add a new item "penwindows" and set it equal to
  215.                           the path to PENWIN.DLL. For example:
  216.  
  217.                           penwindows=C:\BORLANDC\REDIST\PENWIN.DLL
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.                                    - 3 -
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233. ------------------  The PENWIN.INI file contains a number of initialization
  234. PENWIN.INI changes  settings for Windows for Pen Computing.
  235. ------------------
  236.                     There are also two explicit paths that must correctly
  237.                     identify the locations of MARS.DLL and MARS.MOB.
  238.                     INSTALL will add the correct paths to PENWIN.INI but if
  239.                     you move any files, open PENWIN.INI with any generic
  240.                     text editor (like Windows Notepad) and change the path
  241.                     to MARS.DLL and MARS.MOB so that it correctly
  242.                     identifies points to the correct location.
  243.  
  244.                     Once the paths are correct, the file should be copied
  245.                     to the Windows 3.1 root--that is, the directory
  246.                     containing the Windows 3.1 WIN.COM.
  247.  
  248.  
  249.  
  250. ===========================================================================
  251. Shipping PENWIN.DLL with your application
  252. ===========================================================================
  253.  
  254.                     PENWIN.DLL is a fully redistributable component of
  255.                     Windows for Pen Computing. Because applications will
  256.                     seek to leverage the Pen API--hedit and bedit controls
  257.                     in particular--PENWIN.DLL can be shipped with your
  258.                     application. There are some considerations to keep in
  259.                     mind in shipping PENWIN.DLL with your application:
  260.  
  261.                     1. PENWIN.DLL functions ONLY under Windows 3.1. It WILL
  262.                        NOT WORK with Windows 3.0 because it functions only
  263.                        as an installable device driver--a feature not
  264.                        present in Windows 3.0.
  265.  
  266.                     2. As with other redistributable components such as
  267.                        BWCC.DLL and the OLE libraries, it is the
  268.                        responsibility of the application vendor to
  269.                        determine whether PENWIN.DLL has already been
  270.                        installed (there is a GetSystemMetrics() call for
  271.                        this) and to ensure that the version of PENWIN.DLL
  272.                        with the latest version stamping is the one that is
  273.                        running.
  274.  
  275.                     3. Unlike some of the other redistributable components,
  276.                        if your application installs PENWIN.DLL for the
  277.                        first time, or replaces the current version with a
  278.                        later one, Windows will have to be restarted. As an
  279.  
  280.  
  281.  
  282.  
  283.  
  284.                                    - 4 -
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.                        installable driver PENWIN.DLL can be loaded only at
  292.                        Windows boot time. Restarting Windows can be
  293.                        accomplished via an ExitWindows() call or by simply
  294.                        prompting the user to do so.
  295.  
  296.                        To install PENWIN.DLL on a Windows 3.1 system follow
  297.                        the "Minimum" procedure listed above.
  298.  
  299.                     4. PENWIN.DLL may be in either the \WINDOWS or the
  300.                        \WINDOWS\SYSTEM directory. The default will be
  301.                        \WINDOWS but since Windows for Pen Computing is an
  302.                        OEM product, Microsoft cannot completely control
  303.                        where PENWIN.DLL is located on a particular machine.
  304.  
  305.  
  306.  
  307. ===========================================================================
  308. Release notes
  309. ===========================================================================
  310.  
  311.                     Release Notes for the Microsoft(R) Windows for Pen
  312.                     Computing Programmer's Reference, version 1.00 (C)
  313.                     Copyright 1992 Microsoft Corporation.
  314.  
  315.                     This section contains release notes for version 1.00 of
  316.                     the Microsoft(R) Windows for Pen Computing Programmer's
  317.                     Reference. The information in this section is more
  318.                     current than the information in the manual. Where this
  319.                     file conflicts with printed documentation, you should
  320.                     assume that this file is correct.
  321.  
  322.                     Microsoft revises its documentation at the time of
  323.                     reprinting; the manuals and online help files may
  324.                     already include some of this information.
  325.  
  326.  
  327.    Hedits--delayed  =======================================================
  328.    recogntion mode
  329.                     Setting focus in hedit causes any text in the control
  330.                     to appear even if the control is in "ink" mode. If this
  331.                     is undesireable the control should never be allowed to
  332.                     get the focus.
  333.  
  334.                     Sending an hedit the WM_HEDITCTL message with the
  335.                     HE_SETINKMODE parameter will clear the hedit's text
  336.                     buffer. The same message to a bedit will preserve the
  337.                     control's text contents.
  338.  
  339.  
  340.  
  341.  
  342.                                    - 5 -
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349. PostVirtualMouseEvent======================================================
  350.  
  351.                     Values greater than the maximum resolution in X
  352.                     direction (usually 640) and max resoultion Y direction
  353.                     (usually 480) will overflow.
  354.  
  355.  
  356.      ALC_USEBITMAP  =======================================================
  357.  
  358.                     The Microsoft recognizer does not implement
  359.                     ALC_USEBITMAP in the alcPriority field for version 1.0.
  360.                     Note that alcPriority is implemented for the alc field.
  361.  
  362.  
  363.     ProcessWriting  =======================================================
  364.  
  365.                     In the description of ProcessWriting, it says "The
  366.                     window specified by the hwnd parameter receives a
  367.                     WM_PARENTNOTIFY message when ProcessWriting destroys
  368.                     its inking window."
  369.  
  370.                     The window never gets the WM_PARENTNOTIFY message since
  371.                     it is not
  372.                     guaranteed that an inking window is created.
  373.  
  374.  
  375.     Microsoft user  =======================================================
  376.     dictionary DLL
  377.                     The documentation incorrectly states that up to 16
  378.                     dictionaries can be loaded.
  379.  
  380.                     MSSPELL.DLL actually allows only six wordlists to be
  381.                     loaded. Consequently, version 1.00 of the Microsoft
  382.                     User Dictionary DLL allows only six wordlists to be
  383.                     loaded at a time.
  384.  
  385.  
  386.    WM_HEDITCTL and  =======================================================
  387.      HE_CHAROFFSET
  388.                     Under the documentation for WM_HEDITCTL messages, under
  389.                     HE_CHAROFFSET, it says "See the related HE_CHAROFFSET."
  390.                     It should say "See the related HE_CHARPOSITION."
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.                                    - 6 -
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.     WM_SKB message  =======================================================
  408.  
  409.                     When the state of the SKB changes, a WM_SKB message is
  410.                     posted. The documentation says that the LOWORD of the
  411.                     lParam contains information on what changed and that
  412.                     the HIWORD contains the window handle of the SKB.
  413.  
  414.                     Actually, the LOWORD contains the hWnd and the HIWORD
  415.                     contains the information on what changed.
  416.  
  417.                     This should be corrected in two places: The
  418.                     ShowKeyboard function and in the WM_SKB message
  419.                     documentation.
  420.  
  421.                     Also, one more value should be mentioned: The HIWORD of
  422.                     lParam contains SKN_TERMINATED (value 0xffff) if the
  423.                     keyboard has been closed.
  424.  
  425.  
  426.     SKN_TERMINATED  =======================================================
  427.  
  428.                     WM_SKB sends SKN_TERMINATED in HIWORD(lParam) when
  429.                     terminating SKN_TERMINATED (0xffff) is sent in the
  430.                     HIWORD(lParam) when the WM_SKB is sent to notify
  431.                     top-level windows that the On-Screen Keyboard is being
  432.                     terminated. This needs to be added to the documentation
  433.                     for the WM_SKB message and for the ShowKeyboard
  434.                     function.
  435.  
  436.  
  437.          REC_DEBUG  =======================================================
  438.  
  439.                     In the Guide to Pen Programming, Chapter 11 "Pen
  440.                     Messages and
  441.                     Constants," under REC_ Values, under Debugging Values,
  442.                     it says:
  443.  
  444.                     "REC_DEBUG All debugging return values are less than
  445.                     this."
  446.  
  447.                     It should say:
  448.  
  449.                     "REC_DEBUG All debugging return values are less than or
  450.                     equal to this."
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.                                    - 7 -
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.       clErrorLevel  =======================================================
  466.  
  467.                     The documentation for the RC field clErrorLevel says
  468.                     that this value can range from 0 to 100. In the
  469.                     PENWIN.H file, the minimum CL value is defined as
  470.  
  471.                      #define CL_MINIMUM 1
  472.  
  473.                     The correct minimum for clErrorLevel is 1
  474.  
  475.  
  476.         Dictionary  =======================================================
  477.           searches
  478.                     The documentation is somewhat confusing on the point of
  479.                     dictionary enumeration procedures in chapter 7, page
  480.                     103. To expound:
  481.  
  482.                     If there are ten dictionaries in the dictionary path,
  483.                     and the ninth finds a match for a particular
  484.                     enumeration in a symbol graph, the remaining symbol
  485.                     graph elements will STILL be enumerated--checking for a
  486.                     match in a higher-order dictionary. In other words, the
  487.                     other eight dictionaries before the ninth dictionary in
  488.                     the list will get a shot at finding a "better" match.
  489.                     Enumeration of dictionaries therefore can be said to
  490.                     stop only when the symbol graph is exausted, or the
  491.                     first dictionary in the list responds affirmatively to
  492.                     a query.
  493.  
  494.  
  495.       rc.RectBound  =======================================================
  496.  
  497.                     Here is additional detail on the rectBound element of
  498.                     the RC structure.
  499.  
  500.                     rc.rectBound will be ignored if PCM_RECTBOUND is not
  501.                     set. The documentation suggests on page 237 that
  502.                     rc.lPcm = PCM_RECTBOUND only determines how the
  503.                     recognition context will end.
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.                                    - 8 -
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523. DRV_SetSamplingDist =======================================================
  524.  
  525.                     Page 226 of Chapter 10--PENINFO structure:
  526.  
  527.                     In the notes after nSamplingRate and nSamplingDist, the
  528.                     driver messages that manipulate these fields are
  529.                     misnamed. In the printed documentation, they are named
  530.                     DRV_SetSamplingDist and DRV_SetSamplingRate; they are
  531.                     actually DRV_SetPenSamplingDist and
  532.                     DRV_SetPenSamplingRate.
  533.  
  534.  
  535.  RecognizeData and  =======================================================
  536.                ink
  537.                     Calls to RecognizeData may return an rcresult that
  538.                     references pendata different than that used as a
  539.                     Parameter to the call. For example, Strokes may be
  540.                     removed and the rgbInk and nInkWidth fields of the
  541.                     PENDATAHEADER may not match the values in the original
  542.                     pendata, as no inking has taken place during this
  543.                     recognition context.
  544.  
  545.  
  546. List of characters  =======================================================
  547.        effected by
  548.           ALC_PUNC  On page 253 of the documentation, the list of chars in
  549.                     ALC_PUNC has two semicolons; one of these should be a
  550.                     colon.
  551.  
  552.  
  553.      DLLs that use  =======================================================
  554.    hedit and bedit
  555.           controls  Any DLL that creates an hedit or bedit control must
  556.                     have a nonzero heap size. This is because those
  557.                     controls allocate buffers out of this heap.
  558.  
  559.  
  560.     Dictionary and  =======================================================
  561.   recognizer ISVs:
  562.  When Windows ends  When a Windows session is about to end, PENWIN.DLL
  563.                     takes the following actions:
  564.  
  565.                     o Calls all the dictionaries in the global recognition
  566.                       context with a DIRQ_CLEANUP message and then frees
  567.                       the corresponding DLLs.
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.                                    - 9 -
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.                     o Calls the CloseRecognizer function for the current
  582.                       recognizer and frees the corresponding DLL.
  583.  
  584.                     Dictionaries and recognizers can take the appropriate
  585.                     cleanup action at this time. The limitations on things
  586.                     that can be done are the same as those when an
  587.                     application receives a WM_ENDSESSION message.
  588.  
  589.  
  590.  
  591.  
  592.  SetAlcBitGesture,  =======================================================
  593. ResetAlcBitGesture,
  594.                and  The Windows for Pen Computing Programmer's Reference
  595.    IsAlcBitGesture  refers to the above macros. They have been removed
  596.            removed  because the ability to set alc bits for gestures was
  597.                     not implemented.
  598.  
  599.  
  600.  REC_ error values  =======================================================
  601.    from Recognize
  602.                     In the documentation for Recognize API and REC_ values
  603.                     in chapter 11, there is a Debugging values section.
  604.                     There is a sentence that reads: "All of the values
  605.                     listed in the following table are in debug version
  606.                     only." That sentence should be replaced with the
  607.                     following: "All of the values below are providing for
  608.                     debugging information. A well-behaved application
  609.                     should not specify an RC that causes any of these
  610.                     values to be returned."
  611.  
  612.  
  613.   DIRQ_SUGGEST not  =======================================================
  614.        implemented
  615.                     In version 1.0 of Windows for Pens, the dictionary
  616.                     shipped with the system does not support DIRQ_SUGGEST.
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.                                   - 10 -
  633.  
  634.