Add Method [InkStrokes Collection]
Add Method [InkStrokes Collection] |
Adds a IInkStrokeDisp object or InkStrokes collection to an existing InkStrokes collection.
Declaration
[C++]
HRESULT Add (
[in] IInkStrokeDisp* stroke
);
[Microsoft® Visual Basic® 6.0]
Public Sub Add(
stroke As IInkStrokeDisp _
)
Parameters
stroke
[in] Specifies the stroke to add to the InkStrokes collection.
Return Value
HRESULT value | Description |
---|---|
S_OK | Success. |
E_POINTER | A parameter contained an invalid pointer. |
E_OUTOFMEMORY | Cannot allocate Stroke handler helper object. |
E_INK_EXCEPTION | An exception occurred inside the method. |
E_INK_INCOMPATIBLE_OBJECT | IInkStrokeDisp* does not point to a compatible IInkStrokeDisp object. |
E_INK_MISMATCHED_INK_OBJECT | The InkDisp object of the IInkStrokeDisp being added does not match the InkDisp object of the InkStrokes collection. |
Remarks
Note: The stroke must already exist within the InkDisp object, and cannot belong to another InkDisp object. Also, this method does not copy or otherwise alter the InkDisp object, but merely adds this stroke to the collection.
Use this method to add one stroke to a InkStrokes collection. To add one collection of strokes to another, use the AddStrokes method.
Examples
[Visual Basic 6.0]
This Visual Basic 6.0 example adds the IInkStrokeDisp, theNewStroke to the collection of strokes in the InkDisp object, theInk.
theInk.Strokes.Add theNewStroke