Microsoft KB Archive/121097

= How to Set Up Desktop Computer for Developing Pen Applications =

Article ID: 121097

Article Last Modified on 12/9/2003

-

APPLIES TO


 * Microsoft Visual Basic 2.0 Standard Edition
 * Microsoft Visual Basic 3.0 Professional Edition
 * Microsoft Visual Basic 2.0 Professional Edition
 * Microsoft Visual Basic 3.0 Professional Edition

-



This article was previously published under Q121097



SUMMARY
The PENCNTRL.VBX custom control provides an easy method for developing pen- based applications. However, this control will not load unless Windows for Pen Computing is detected on your computer. This article explains how to use the Microsoft Windows Software Development Kit (SDK) to develop pen- based applications without having to install Windows for Pen Computing.

The More Information section below contains the first four sections of the README.TXT provided with the Microsoft Windows SDK. It tells you how to configure your computer to provide basic Pen functionality. To make use of this information, you must have either the Microsoft Windows Software Development Kit or Microsoft Visual C++ Profession Edition.



MORE INFORMATION
The following information is from the README.TXT file included with Microsoft Windows for Pen Computing Files. This file contains the following information regarding building Microsoft Windows for Pen Computing applications:

I. Introduction

II. Hardware Requirements and Basic Limitations

III. Installation Notes and Procedures

IV. Shipping PENWIN.DLL with your application

I. Introduction
The Windows SDK contains sufficient components from Windows for Pen Computing to allow the application designer to build and test pen applications. The Microsoft Mouse can be used to get a rough idea of how recognition and a pen will work.

However, it is strongly recommended that Windows for Pen Computing hardware in the form of a computer or peripheral device be used during the design and development process. This is critical because a pen gives the application designer an accurate feeling for how an application will work in real situations and because the Microsoft Alphanumeric Recognition System shipped with the Windows SDK has been optimized for a pen and will work less well with a mouse.

II. Hardware Requirements and Basic Limitations

 * 1) A driver for the Microsoft Mouse has been provided so that simple testing of pen functionalities can be done. This pen driver is called MSMOUSE.DRV.
 * 2) At this time, only VGA displays can be used with the pen extensions. The VGAP.DRV display driver is a modified version of the VGA.DRV that supports inking. It is required if the pen functionalities are to be tested.
 * 3) Handwriting recognition with the Microsoft Mouse will achieve poor results in comparison to digitizer hardware designed specifically for Pen Computing. The recognizer has been designed to work with pen computers and peripherals with true digitizer input and its associated high data rates and high data resolution.
 * 4) The spell checking technology included in Windows for Pens may be used exclusively for the purpose of improving handwriting recognition. It is not to be used by applications as a spell checker or spelling corrector.

Installing the Pen Components - Minimum
This procedure will result in a system that will let you build applications that contain hedit and bedit controls - and call any of the Windows for Pen Computing APIs. You will not be able to perform handwriting recognition or see ink on the screen.

SYSTEM.INI Changes:

Add or change the following items in your SYSTEM.INI file so that the pen extensions will work.

NOTE: Back up your old SYSTEM.INI file before proceeding.

 In the "[boot]" section:

  Add "penwindows" to the list of drivers after the "drivers=" key. For example: drivers=mmsystem.dll penwindows   In the "[Drivers]" section:

 Add a new item "penwindows" and set it equal to the path to PENWIN.DLL. For example:

penwindows=C:\MSVC\REDIST\PENWIN.DLL

 </ol>

When Windows is restarted, PENWIN.DLL will be loaded as an installed driver and you will be able to run applications containing bedit and hedit controls and call the Windows for Pen Computing APIs.

Installing the Pen Components - Complete
This procedure will result in a system that will run pen applications and allow you to experiment with handwriting recognition and inking functionalities in your applications. Once again, interaction with the mouse will prove inferior in every respect to interaction with a true pen device - but this system of using the special mouse driver will allow you to experiment and perform rudimentary testing of your pen functionalities.

SYSTEM.INI Changes:

Add or change the following items in your SYSTEM.INI file so that the pen extensions will work.

NOTE: Back up your old SYSTEM.INI file before proceeding.

 In the "[boot]" section:

 Change the "display.drv=" line so that the display driver is the pen capable VGAP.DRV driver shipped with the Windows SDK. For example:

display.drv=C:\MSVC\PEN\VGAP.DRV

NOTE: Only the VGA display device is supported by the pen components in the Windows SDK.</li>  Add "pen penwindows" to the list of drivers after the "drivers=" key. For example: drivers=mmsystem.dll pen penwindows </li> Change the "mouse.drv=" line so that it points to YESMOUSE.DRV. For example:

mouse.drv=C:\MSVC\PEN\YESMOUSE.DRV

</li></ol> </li> In the "[Drivers]" section:

 Add a new item "pen" and set it equal to the path to MSMOUSE.DRV. For example:

pen=C:\MSVC\PEN\MSMOUSE.DRV

</li> Add a new item "penwindows" and set it equal to the path to PENWIN.DLL. For example:

penwindows=C:\MSVC\REDIST\PENWIN.DLL

</li></ol> </li></ol>

PENWIN.INI Changes:

The PENWIN.INI file contains a number of initialization settings for Windows for Pen Computing.

There are also two explicit paths that must correctly identify the locations of MARS.DLL and MARS.MOB. The Windows SDK installation procedure did not update these paths for users who chose to install to a directory other than the default, so you need to update them by hand.

Open PENWIN.INI with any generic text editor (like Windows Notepad) and change the path to MARS.DLL so that it correctly identifies and points to the current MARS.DLL location. Do the same for MARS.MOB.

Once the paths are correct, copy the file to the Windows version 3.1 root - that is, the directory containing the Windows version 3.1 WIN.COM file.

IV. Shipping PENWIN.DLL with your application
PENWIN.DLL is a fully redistributable component of Windows for Pen Computing. Because applications will seek to leverage the Pen API - hedit and bedit controls in particular - PENWIN.DLL can be shipped with your application. There are some considerations to keep in mind in shipping PENWIN.DLL with your application:


 * 1) PENWIN.DLL functions only under Windows version 3.1. It will not work with Windows version 3.0 because it functions only as an installable device driver - a feature not present in Windows version 3.0.
 * 2) As with other redistributable components such as COMMDLG.DLL and the OLE libraries, it is the responsibility of the application vendor to determine whether PENWIN.DLL has already been installed (there is a GetSystemMetrics call for this) and to ensure that the version of PENWIN.DLL with the latest version stamping is the one that is running. These issues are the same for all redistributable components, and further information is contained elsewhere in the SDK.
 * 3) Unlike some of the other redistributable components, if your application installs PENWIN.DLL for the first time, or replaces the current version with a later one, Windows will have to be restarted. As an installable driver PENWIN.DLL can be loaded only at Windows boot time. Restarting Windows can be accomplished by using an ExitWindows call or by simply prompting the user to restart Windows.

NOTE: To install PENWIN.DLL on a Windows 3.1 system follow the "Minimum" procedure listed above.
 * 1) PENWIN.DLL may be in either the \WINDOWS or the \WINDOWS\SYSTEM directory. The default will be \WINDOWS but because Windows for Pen Computing is an OEM product. Microsoft cannot completely control where PENWIN.DLL is located on a particular machine.

Additional query words: 2.00 3.00

Keywords: KB121097

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.