PacketProperty Constants

PacketProperty Constants

Defines values that specify the packet properties. The Tablet PC application programming interface (API) uses globally unique identifiers (GUIDs) to identify packet properties, which in Automation are constant strings.

C++

In C++, you can access these constants in the Msinkaut.h header file, which is located in the <systemdrive>:\Program Files\Microsoft Tablet PC Platform SDK\Include directory if you installed the SDK in the default location. In C++, these constants are WCHARs, not BSTRs. Convert them into BSTRs before use. For more information about the BSTR data type, see Using the Automation Library.

Visual Basic 6.0

In Microsoft® Visual Basic® 6.0, these constants are defined in the InkConstants.bas file, which is located in the <systemdrive>:\Program Files\Microsoft Tablet PC Platform SDK\Include directory if you installed the SDK in the default location.

Remarks

Note: All packet values coming from the tablet hardware are 32-bit size integers.

Constants

The following table lists the available packet property globally unique identifier (GUID) fields. Use these GUIDs to specify which properties the packet contains when you create the tablet context. To determine the range and resolution of a property, call the GetPropertyMetrics method.

C++ Name Visual Basic 6.0 Name Definition
STR_GUID_X X The GUID that identifies the packet property for the x-coordinate in the tablet coordinate space. Each packet contains this property by default. The origin (0,0) of the tablet is the upper-left corner.
STR_GUID_Y Y The GUID that identifies the packet property for the y-coordinate in the tablet coordinate space. Each packet contains this property by default. The origin (0,0) of the tablet is the upper-left corner.
STR_GUID_Z Z The GUID that identifies the packet property for the z-coordinate or distance of the pen tip from the tablet surface. The TabletPropertyMetricUnit enumeration type determines the unit of measurement for this property.
STR_GUID_PAKETSTATUS PacketStatus The GUID that identifies the packet property for the current status of the cursor.

Contains one or more of the following flag values in a bit field. Use bit operators to check the status of these values.

  • IP_CURSOR_DOWN (This flag is an integer with a value of 1.) The cursor is touching the drawing surface.
  • IP_INVERTED (This flag is an integer with a value of 2.) The cursor is inverted. For example, the eraser end of the pen is pointing toward the surface.
  • IP_MARGIN (This flag is an integer with a value of 4.) Not used.
STR_GUID_TIMERTICK TimerTick The GUID that identifies the packet property for the time the packet was generated.
STR_GUID_SERIALNUMBER SerialNumber The GUID that identifies the packet property for identifying the packet.

This is the same value you use to retrieve the packet from the packet queue.

STR_GUID_NORMALPRESSURE NormalPressure The GUID that identifies the packet property for pressure of the pen tip perpendicular to the tablet surface.

The greater the pressure on the pen tip, the more ink that is drawn.

STR_GUID_TANGENTPRESSURE TangentPressure The GUID that identifies the packet property for pressure of the pen tip along the plane of the tablet surface.
STR_GUID_BUTTONPRESSURE ButtonPressure The GUID that identifies the packet property for the pressure on a pressure sensitive button.
STR_GUID_XTILTORIENTATION XTiltOrientation The GUID that identifies the packet property for the angle between the y,z-plane and the pen and y-axis plane.

Applies to a pen cursor.

The value is 0 when the pen is perpendicular to the drawing surface and is positive when the pen is to the right of perpendicular.

STR_GUID_YTILTORIENTATION YTiltOrientation The GUID that identifies the packet property for the angle between the x,z-plane and the pen and x-axis plane.

Applies to a pen cursor.

The value is 0 when the pen is perpendicular to the drawing surface and is positive when the pen is upward or away from the user.

STR_GUID_AZIMUTHORIENTATION AzimuthOrientation The GUID that identifies the packet property for the clockwise rotation of the cursor about the z-axis through a full circular range.
STR_GUID_ALTITUDEORIENTATION AltitudeOrientation The GUID that identifies the packet property for the angle between the axis of the pen and the surface of the tablet.

The value is 0 when the pen is parallel to the surface and 90 when the pen is perpendicular to the surface.

The values are negative when the pen is inverted.

STR_GUID_TWISTORIENTATION TwistOrientation The GUID that identifies the packet property for the clockwise rotation of the cursor about its own axis.
STR_GUID_PITCHROTATION PitchRotation The GUID that identifies the packet property that indicates whether the tip is above or below a horizontal line that is perpendicular to the writing surface.

Note: This requires a 3D digitizer.

The value is positive if the tip is above the line and negative if it is below the line. For example, if you hold the pen in front of you and write on an imaginary wall, the pitch is positive if the tip is above a line extending from you to the wall.

STR_GUID_ROLLROTATION RollRotation The GUID that identifies the packet property for the clockwise rotation of the pen around its own axis.

Note: This requires a 3D digitizer.
STR_GUID_YAWROTATION YawRotation The GUID that identifies the packet property for the angle of the pen to the left or right around the center of its horizontal axis when the pen is horizontal.

Note: This requires a 3D digitizer.

If you hold the pen in front of you and write on an imaginary wall, zero yaw indicates that the pen is perpendicular to the wall. The value is negative if the tip is to the left of perpendicular and positive if the tip is to the right of perpendicular.