Share via


Merge Method

Merge Method

Merges the specified InkWordList object into this word list.

Declaration

[C++]

HRESULT Merge (
    [in] IInkWordList* wordList
);

[Microsoft® Visual Basic® 6.0]

Public Sub Merge( _
    wordList As InkWordList _
)

Parameters

wordList

[in] The word list to merge into this word list. Words that already exist in the list are not added.

Return Value

HRESULT value Description
S_OK Success.
E_POINTER A parameter contained an invalid pointer.
E_OUTOFMEMORY Cannot allocate memory to complete the operation.
E_FAIL An unspecified error occurred.
E_INK_EXCEPTION An exception occurred inside the method.

Example

[Visual Basic 6.0]

This Visual Basic 6.0 example shows an example of creating an InkWordList from a Variant array of String, theUserDictionary, and then merging it into the word list of the recognizer context theRecognizerContext.

'...
Dim theUserWordList As New InkWordList
Dim theUserDictionary() As String
...
Dim theString As String
For Each theString In theUserDictionary
    theUserWordList.AddWord theString
Next
theUserWordList.Merge theRecognizerContext.WordList
' Note: there should be no strokes in the Strokes property of the
' Recognizer Context when setting the WordList property
Set theRecognizerContext.WordList = theUserWordList

Applies To