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 mode Description
CAC_FULL Recognition occurs as if all strokes have been completed.
CAC_PREFIX Recognition occurs on partial input. The order of the strokes must conform to the rules of the language.
CAC_RANDOM Recognition occurs on partial input. The order of the strokes can be arbitrary.

Return Value

HRESULT value Description
S_OK Success.
E_INVALIDARG The specified mode is invalid.
E_NOTIMPL The recognizer does not support this function.
E_FAIL You 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.