Export (0) Print
Expand All

InkEdit.Gesture event

Applies to: desktop apps only

Occurs when an application gesture is recognized.

Syntax

HRESULT Gesture(
  [in]       IInkCursor *Cursor,
  [in]       IInkStrokes *Strokes,
  [in]       VARIANT Gestures,
  [in, out]  VARIANT_BOOL *Cancel
);

Parameters

Cursor [in]

The IInkCursor object that was used to create this gesture.

Strokes [in]

The InkStrokes collection that contains the IInkStrokeDisp objects that make up this gesture.

Gestures [in]

An array of IInkGesture objects, in order of confidence.

For more information about the VARIANT structure, see Using the COM Library.

Cancel [in, out]

Whether the InkStrokes collection that makes up this gesture should be canceled, so as not to erase the ink and to fire the Stroke event.

Return value

If this event succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

This event method is defined in the _IInkEditEvents interface. The _IInkEditEvents interface implements the IDispatch interface with an identifier of DISPID_IeeGesture.

A Gesture event is raised only if the IInkStrokeDisp for the IInkGesture object is the first IInkStrokeDisp object since the last call to the Recognize method or the last firing of the recognition timeout.

If the Gesture event is canceled, the Stroke event is raised for the InkStrokes collection that raised the Gesture event.

For this event to occur, the InkEdit control must subscribe to a set of application gestures. To set the InkEdit control's interest in a set of gestures, call the SetGestureStatus method.

For a list of application gestures, see the InkApplicationGesture enumeration type.

The InkEdit control does not recognize multiple stroke gestures.

The InkEdit control subscribes to the following gestures.

GestureAction

Down-left ,Down-left-long

Enter

Right

Space

Left

Backspace

Up-right, Up-right-long

Tab

 

To alter the default action for a gesture:

  1. Add event handlers for the Gesture and Stroke events.
  2. In the Gesture event handler, cancel the Gesture event for the gesture, and perform the alternate action for the gesture.
  3. In the Stroke event handler, cancel the Stroke event for the IInkStrokeDisp object that raised the canceled Gesture event.

Requirements

Minimum supported client

Windows XP Tablet PC Edition

Minimum supported server

None supported

Header

Inked.h (also requires inked_i.c)

Library

InkEd.dll

See also

InkEdit
InkApplicationGesture Enumeration
SetGestureStatus Method [InkEdit Control]
RecoTimeout Property
Stroke Event [InkEdit Control]
Using Gestures

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Community Additions

ADD
Show:
© 2014 Microsoft