Share via


Add Method [IInkCustomStrokes Interface]

Add Method [IInkCustomStrokes Interface]

Adds an InkStrokes collection to a IInkCustomStrokes collection.

Declaration

[C++]

HRESULT Add (
    [in] BSTR name,
    [in] IInkStrokes* strokes
);

[Microsoft® Visual Basic® 6.0]

Public Sub Add( _
    name As String, _
    strokes As InkStrokes _
)

Parameters

name

[in] Specifies the name of the InkStrokes collection to add to the IInkCustomStrokes collection.

For more information about the BSTR data type, see Using the Automation Library.

strokes

[in] Specifies the InkStrokes collection to add to the IInkCustomStrokes collection.

Return Value

HRESULT value Description
S_OK Success.
E_INVALIDARG The item already exists in the collection or a parameter contained an invalid pointer.
E_OUTOFMEMORY Cannot allocate memory to complete the operation.
E_INK_EXCEPTION An exception occurred inside the method.
E_INK_INCOMPATIBLE_OBJECT The collection of strokes is incompatible with the API.
E_INK_MISMATCHED_INK_OBJECT The strokes parameter is associated with a different Ink object.
E_FAIL An unspecified error occurred.

Examples

[Visual Basic 6]

This Visual Basic 6 example adds the current InkStrokes collection in the ink to its IInkCustomStrokes collection.

theInkCollector.Ink.CustomStrokes.Add "OldStrokes", _
    theInkCollector.Ink.Strokes

Applies To