Installing the Tablet PC Platform SDK

Installing the Tablet PC Platform SDK

This section provides an overview of how to install the Tablet PC Platform SDK. If you have already obtained and installed the SDK and have successfully verified its correct installation by compiling a few of the samples, you may wish to skim this section or skip it entirely. You can always refer back to this section if you later run into problems with your installation.

System Requirements

The SDK does not have much in the way of hardware and software requirements. The following two items, however, are necessary and the last one is recommended in order to develop Tablet PC applications with the SDK:

  • Windows XP

    The machine on which you develop with the SDK should be running Windows XP. Ideally, you should run the Tablet PC edition of Windows XP to develop most efficiently.

  • Microsoft Visual Studio 6 Service Pack 5 or later

    For unmanaged development, you can use Visual Studio 6 or Visual Studio .NET. For managed development, you ll need to use Visual Studio .NET.

  • Digitizer pad

    Although not strictly required for development, a digitizer pad that takes pen input is highly recommended. (Try using a mouse to write Rock Me Amadeus three times fast and you will quickly become convinced that a digitizer pad is well worth the money.) For easy installation, consider a USB digitizer pad such as those manufactured by Wacom (http://www.wacom.com).

Getting the SDK

For your convenience, the complete Tablet PC Platform SDK is included on this book s companion CD. The SDK can also be downloaded from Microsoft s Web site from the Tablet PC home page (http://www.microsoft.com/tabletpc). In its compressed distributable form, the SDK is under 12 MB.

To install the SDK, navigate to the directory where the Tablet PC Platform SDK s installation files are located and run Setup.exe. Be sure to read the following section for information about setting up your development environment properly. This setup is critical in order to compile programs that use the SDK.

Setting Up Your Environment

Installing the SDK is fairly straightforward. Throughout the rest of this book, it is assumed that you installed the SDK in its default path (c:\Program Files\Microsoft Tablet PC Platform SDK), although you should feel free to choose any other path as appropriate. The only installation step that may need some explanation is the Custom Setup option, where you can choose which components to install.

The component selection step is shown in Figure 3-2. By default, all the SDK components are installed. However, the SDK samples and redistributable merge module are optional. You should install the SDK samples if you would like to view the samples that come with the SDK most of these showcase various features available on the Tablet PC Platform. The redistributable merge module, mstpcrt.msm, contains the Tablet PC runtime components that may be redistributed with your application. You should need this only if you are building an application that might need to run on non-Tablet computers. The merge module can be included by your application s installer, thereby allowing your application to run gracefully on non-Tablet computers. Remember that when your application is not running on a Tablet PC, any Ink controls you use will not collect or recognize ink.

figure 3-2 custom setup options for the sdk

Figure 3-2. Custom Setup options for the SDK

Setting Up Your Visual Studio .NET Environment

Once the Tablet PC Platform SDK is installed onto your development computer, you will need to update some settings in Visual Studio .NET to use the newly installed components. The rest of this section gives instructions on how to set up an environment for using the SDK with a .NET language such as Visual C# or Visual Basic .NET.

NOTE
If you are using Visual Studio 6 and/or C++, please refer to the Tablet PC Platform SDK documentation for detailed instructions on setting up your development environment.

In order to use the managed API, your project should reference Microsoft.Ink.dll. To add a reference, use the Project menu s Add Reference item, as shown in Figure 3-3, which will bring up the Add Reference dialog box.

figure 3-3 the add reference command is found in the project menu.

Figure 3-3. The Add Reference command is found in the Project menu.

Select Microsoft Tablet PC API from the .NET tab, as shown in Figure 3-4.

figure 3-4 the add reference dialog box is where you add a new reference to your project.

Figure 3-4. The Add Reference dialog box is where you add a new reference to your project.

You can see that you have successfully added the reference if the Solution Explorer shows Microsoft.Ink as one of the references, shown in Figure 3-5.

figure 3-5 a successfully added reference to microsoft.ink shows up in the solution explorer.

Figure 3-5. A successfully added reference to Microsoft.Ink shows up in the Solution Explorer.

If you re using Ink controls, you may want to add them to the Toolbox for easy drag-and-drop into application forms. To add the Ink controls to the Toolbox, right click the Toolbox and select Customize Toolbox, as shown in Figure 3-6.

figure 3-6 the customize toolbox link can be found by right clicking on the toolbox.

Figure 3-6. The Customize Toolbox link can be found by right clicking on the Toolbox.

From the Customize Toolbox dialog box s .NET Framework Components tab, select and check both InkEdit and InkPicture, as shown in Figure 3-7. The Ink controls will now be available in the General tab of the Toolbox, as shown in Figure 3-8.

figure 3-7 adding new components to the toolbox using the customize toolbox dialog box.

Figure 3-7. Adding new components to the Toolbox using the Customize Toolbox dialog box.

figure 3-8 the ink controls in the toolbox under the general tab.

Figure 3-8. The Ink controls in the Toolbox under the General tab.

Anatomy of the Tablet PC Platform SDK

Following are the location and names of some important files installed as part of a standard installation of the SDK.

NOTE
A full installation of the SDK copies more than 160 files! The list below highlights the files of interest and reflects a small subset of what is actually installed.

  • Microsoft.Ink (\Windows\Assembly\GAC)

    This is the heart of the managed API. Almost the entire managed API is implemented within this assembly, which is the focal point of the Tablet PC Platform SDK. It is stored in the Global Assembly Cache (GAC) because many applications will share its functionality.

  • InkObj.dll (\Program Files\Common Files\Microsoft Shared\Ink)

    This file includes most of the core ink services used internally by the platform. In addition, it includes the COM automation APIs and type libraries.

  • TPCSDK10.chm (\Windows\Help)

    This is the SDK s help documentation in HTML Help format. You will find a convenient shortcut to this in the Microsoft Tablet PC Platform SDK entry of your Start menu.

  • MSInkAut.h (\Program Files\Microsoft Tablet PC Platform SDK\Include)

    The main COM automation API header is available here to include in your C++ projects. Alternatively, you can import InkObj.dll to access the same type information.

  • \Program Files\Microsoft Tablet PC Platform SDK\Samples

    All SDK samples are included in subdirectories of the Samples directory. There are nearly 20 samples, ranging from Advanced Recognition to TPC Info. Some samples come in multiple languages, in which case code for each language is put into its own directory.

  • \Program Files\Microsoft Tablet PC Platform SDK\Bin

    The compiled executables from the SDK samples are installed in the Bin directory (if you choose to install the sample binaries).

  • InkEd.dll (\Windows\System32)

    The InkEdit control is implemented in this dynamic-link library (DLL).

  • Wisptis.exe (\Windows\System32)

    This executable runs as a system service that provides pen-data collection for other components of the SDK. When a component needs to interact with the pen (for example, to collect ink or to detect gestures), this executable is spawned as a service to communicate directly with the input device. On a Tablet PC, Wisptis.exe interacts with the digitizer, whereas on a desktop it interacts with the mouse as well. The executable s name is an acronym that references an outdated internal name for the team that developed it (Windows Ink Services Platform Tablet Input Subsystem).



Building Tablet PC Applications
Building Tablet PC Applications (Pro-Developer)
ISBN: 0735617236
EAN: 2147483647
Year: 2001
Pages: 73

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net