SetCACMode Function

SetCACMode Function

Specifies character Autocomplete mode for character or word recognition.

You cannot turn off character Autocomplete after it is set.

Syntax

[C++]

HRESULT WINAPI SetCACMode(
  HRECOCONTEXT hrc,
  int iMode
);

Parameters

hrc

[in] Handle to the recognizer context.

iMode

[in] The following table lists the possible character Autocomplete modes.

Character Autocomplete modeDescription
CAC_FULLRecognition occurs as if all strokes have been completed.
CAC_PREFIXRecognition occurs on partial input. The order of the strokes must conform to the rules of the language.
CAC_RANDOMRecognition occurs on partial input. The order of the strokes can be arbitrary.

Return Value

HRESULT valueDescription
S_OKSuccess.
E_INVALIDARGThe specified mode is invalid.
E_NOTIMPLThe recognizer does not support this function.
E_FAILYou must call the SetGuide function before calling this function.

Remarks

Some recognizers do not support character Autocomplete. To determine if the recognizer supports character Autocomplete, call the GetRecoAttributes function and check the dwRecoCapabilityFlags member of the RECO_ATTRS structure.

Show: