Share via


Item Method [IInkCursors Interface]

Item Method [IInkCursors Interface]

Returns the IInkCursor object at the specified index within the IInkCursors collection.

Declaration

[C++]

HRESULT Item (
    [in] long index,
    [out, retval] IInkCursor** Cursor
);

[Microsoft® Visual Basic® 6.0]

Public Function Item( _
    index As Long _
) As IInkCursor

Parameters

index

[in] The zero-based index of the IInkCursor object to get.

Cursor

[out] Returns the IInkCursor object at the specified index within the IInkCursors collection.

Return Value

HRESULT value Description
S_OK Success.
E_POINTER A parameter contained an invalid pointer.
E_FAIL An unspecified error occurred.
CO_E_CLASSTRING Invalid GUID format.
DISP_E_TYPEMISMATCH One of the parameters is not a valid VARIANT type.
E_INVALIDARG Invalid argument.
E_UNEXPECTED Unexpected parameter or property type.
REGDB_CLASSNOTREG Type object not registered.
E_OUTOFMEMORY Cannot allocate memory to complete the operation.
E_INK_EXCEPTION An exception occurred inside the method.
TPC_E_RECOGNIZER_NOT_REGISTERED The recognizers registry key is corrupted.

Remarks

An error occurs if the index doesn't match any existing member of the collection.

Example

[Visual Basic 6.0]

This Visual Basic 6.0 example gets the first IInkCursor from the Cursors property of an InkCollector object.

Dim theFirstCursor As IInkCursor
Set theFirstCursor = theInkCollector.Cursors.Item(0)

Applies To