InkCollector.Stroke event

Occurs when the user draws a new stroke on any tablet.

Syntax

void Stroke(
  [in]      IInkCursor     *Cursor,
  [in]      IInkStrokeDisp *Stroke,
  [in, out] VARIANT_BOOL   *Cancel
);

Parameters

Cursor [in]

The IInkCursor object that generated the Stroke event.

Stroke [in]

The collected IInkStrokeDisp object.

Cancel [in, out]

VARIANT_TRUE to cancel the event; otherwise, VARIANT_FALSE.

Return value

This event does not return a value.

Remarks

This event method is defined in the _IInkCollectorEvents, _IInkOverlayEvents, and _IInkPictureEvents dispatch-only interfaces (dispinterfaces) with an ID of DISPID_ICEStroke.

The Stroke event is fired when in select or erase mode, not just when inserting ink. This requires that you monitor the editing mode (which you are responsible for setting) and are aware of the mode before interpreting the event. The advantage of this requirement is greater freedom to innovate on the platform through greater awareness of platform events.

Note

The Stroke event fires when the user finishes drawing a stroke, not when a stroke is added to the InkStrokes collection. When the user first starts to draw a stroke, it is added immediately to the InkStrokes collection; however, the Stroke event does not fire until the stroke is complete. Therefore, strokes can exist in the InkStrokes collection that the Stroke event handler has not seen.

Requirements

Requirement Value
Minimum supported client
Windows XP Tablet PC Edition [desktop apps only]
Minimum supported server
None supported
Header
Msinkaut.h (also requires Msinkaut_i.c)
Library
InkObj.dll

See also

InkCollector Class

StrokesAdded Event [InkStrokes Collection]

StrokesDeleted Event [InkOverlay Class]

IInkCursor Interface

IInkStrokeDisp Interface