StrokesAdded Event

StrokesAdded Event

Occurs when one or more strokes are added to the InkStrokes collection.

Declaration

[C++]

void StrokesAdded([in] VARIANT StrokeIds);

[Microsoft® Visual Basic® 6.0]

Public Event StrokesAdded(StrokeIds)

Parameters

StrokeIds

[in] The integer array of identifiers for every IInkStrokeDisp object added when this event occurs.

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

Remarks

This event method is defined in the _IInkStrokesEvents interface. The _IInkStrokesEvents interface implements the IDispatch Leave Site interface with an identifier of DISPID_SEStrokesAdded.

Example

[Visual Basic 6.0]

This Visual Basic 6.0 example demonstrates adding a StrokesAdded event handler to an InkStrokes collection. The event handler writes information about the added strokes to a list box, (List1).

'...
Dim WithEvents theStrokes As InkStrokes

'...

Private Sub theStrokes_StrokesAdded(ByVal TheAddedStrokeIDs As Variant)
    Dim i As Long
    For Each i In TheAddedStrokeIDs
        List1.AddItem "Added stroke ID " & i
    Next
End Sub

Private Sub theStrokes_StrokesRemoved(ByVal TheAddedStrokeIDs As Variant)
    Dim i As Long
    For Each i In TheAddedStrokeIDs
        List1.AddItem "Deleted stroke ID " & i
    Next
End Sub

Applies To