Referencing the SDK from Microsoft Visual Studio

Referencing the SDK from Microsoft Visual Studio

Description of referencing the SDK from Microsoft Visual Studio.

This describes what steps are needed to reference the Microsoft® Windows® XP Tablet PC Edition Software Development Kit (SDK) for C#, Microsoft Visual Basic® .NET, Visual Basic 6.0, and Microsoft Visual C++® 6.0.

Using the Managed Library and Controls

Microsoft Visual C# and Visual Basic.NET

To build Tablet PC applications in C# and Visual Basic .NET, you must add a reference to the Tablet PC SDK to your project in Microsoft Visual Studio® .NET. This provides access to the managed object model and controls.

The Tablet PC managed library assemblies are installed by default in the %ProgramFiles%\Microsoft Tablet PC Platform SDK\Include directory.

To add a reference to the Windows XP Tablet PC Edition Development Kit 1.7 in Visual Studio .NET

  1. Open your Visual Studio .NET project.
  2. On the Project menu, click Add Reference.
  3. On the .NET tab in the Add Reference dialog box, on the components list, select Microsoft Tablet PC API, version 1.7.xxxx.x.
  4. Click Select, and then click OK.

To update the environment variables

As an alternative to adding a reference to every new project, you can set environment variables that reference the path to the Tablet PC SDK so that you do not need to add a reference in each of your Visual Studio projects.

If you are using Windows XP:

  1. On the Start menu, click Control Panel.

  2. If you are using the Category View, click the Performance and Maintenance icon, and then click the System icon.

    If you are using the Classic View, double-click the System icon.

  3. On the Advanced tab in the System Properties dialog box, click Environment Variables.

  4. Under System variables in the Environment Variables dialog box, select Path, and then click Edit.

  5. In the Edit System Variable dialog box, add ; "%CommonProgramFiles%\Microsoft Shared\Ink" to the Variable value, and then click OK.

  6. Under System variables in the Environment Variables dialog box, select INCLUDE, and then click Edit.

  7. In the Edit System Variable dialog box, add ; "%ProgramFiles%\Microsoft Tablet PC Platform SDK\Include" to the Variable value, and then click OK.

  8. In the Environment Variables dialog box, click OK.

  9. In the System Properties dialog box, click OK.

Using the Automation Library and ActiveX Controls

Microsoft Visual Basic 6

To build Tablet PC applications in Visual Basic 6.0, reference the Microsoft Tablet PC Type Library, version 1.0 (InkObj.dll). InkObj.dll is installed in the %CommonProgramFiles%\Microsoft Shared\Ink folder by default.

You must also add the InkConstants.bas file, found in %ProgramFiles%\Microsoft Tablet PC Platform SDK\Include, to your project.

To use the InkEdit ActiveX Control in your application, right-click the toolbox and select Components. Add a reference to the Microsoft InkEdit Control 1.0 (InkEd.dll). InkEd.dll is installed in the %SystemRoot%\system32 folder.

To use the InkDivider, create a reference in your project to the Microsoft InkDivider Type Library, version 1.5 (InkDiv.dll) found under %CommonProgramFiles%\Microsoft Shared\Ink by default.

To use the PenInputPanel, create a reference to the Microsoft PenInputPanel 1.5 type library (PIPanel.dll) found under %CommonProgramFiles%\Microsoft Shared\Ink by default.

Note: To reference and use the PenInputPanel in , you must be developing on a computer that has Windows XP Tablet PC Edition installed.

Microsoft Visual C++

To build Tablet PC applications in Visual C++ 6.0, you need to update the system environment variables, set up directory options for Visual Studio, and access the Tablet PC interfaces in your project.

To update the environment variables

  1. In the System Properties dialog box, click the Advanced tab, and then click Environment Variables.
  2. Under System variables, select Path, and then click Edit.
  3. In the Edit System Variable dialog box, add ; "%CommonProgramFiles%\Microsoft Shared\Ink" to the Variable value, and then click OK.
  4. Under System variables, select INCLUDE, and then click Edit.
  5. In the Edit System Variable dialog box, add ; "%ProgramFiles%\Microsoft Tablet PC Platform SDK\Include" to the Variable value, and then click OK.

To set up directory options for Visual Studio

  1. On the Tools menu, click Options.
  2. On the Directories tab, in the Show directories for list, select Include files. (In Visual Studio .NET, the Visual C++ Directories options are located under the Projects node.)
  3. Under Directories (the Include Directories list in Visual Studio .NET), add %ProgramFiles%\Microsoft Tablet PC Platform SDK\Include, and then press ENTER.
  4. In the Show directories for list, select Library files.
  5. Under Directories (the Library Directories list in Visual Studio .NET), add %CommonProgramFiles%\Microsoft Shared\Ink, and then press ENTER.
  6. Click OK.

Accessing the Tablet PC Interfaces

To access the Tablet PC interfaces, you must include the Msinkaut.h and Msinkaut_i.c files in your project.

#include <msinkaut.h>
#include <msinkaut_i.c>

You can also use the following import directive instead of the #include statements previously listed.

#import "InkObj.dll" no_namespace exclude("tagXFORM")

To access the InkDivider interfaces you must include msinkaut15_i.c and msinkaut15.h files in your project.

#include <msinkaut15.h>
#include <msinkaut15_i.c>

You can also use the following import directive instead of the # include statements.

#import "InkDiv.dll" no_namespace exclude("tagXFORM")

To access the PenInputPanel interfaces you must include PenInputPanel_i.c and PenInputPanel.h files in your project.

#include <PenInputPanel.h>
#include <PenInputPanel_i.c>

You can also use the following import directive instead of the # include statements.

#import "PIPanel.dll" no_namespace 

To access the InkEdit Control interfaces, you must include the Inked.h and Inked_i.c files in your project.

#include <inked.h>
#include <inked_i.c>

Alternatively, you can #import the InkEd.dll file.

#import "InkEd.dll" no_namespace exclude("tagXFORM")