Freigeben über


SetEnabledUnicodeRanges Function

SetEnabledUnicodeRanges Function

Enables one or more Unicode point ranges on the context.

Syntax

[C++]

HRESULT WINAPI SetEnabledUnicodeRanges(
  HRECOCONTEXT hrc,
  ULONG cRanges,
  CHARACTER_RANGE *pRanges
);

Parameters

hrc

[in] Handle to the recognizer context.

cRanges

[in] Number of ranges in the pRanges buffer.

pRanges

[in] Array of CHARACTER_RANGE structures. Each structure identifies a range of Unicode points that you want to enable in the recognizer. The order of the array is arbitrary.

Return Value

HRESULT value Description
S_OK Success.
TPC_S_TRUNCATED The recognizer does not support one of the specified Unicode point ranges.
E_POINTER One of the parameters is an invalid pointer.

Remarks

The SetEnabledUnicodeRanges function is optional.

Some recognizers do not support enabling and disabling specific code points, but may still include the SetEnabledUnicodeRanges function. For such recognizers the SetEnabledUnicodeRanges function returns E_NOTIMPL.

Each recognizer supports one or more Unicode point ranges. To determine which Unicode point ranges the recognizer supports, call the GetUnicodeRanges function. If you do not call this function, the recognizer uses a default set of Unicode point ranges. The default ranges are recognizer-specific.

Microsoft gesture recognizers use Unicode characters from 0xF000 to 0xF0FF. Each single Unicode value in this range represents a single gesture. For a complete list of Unicode values for gestures, see Unicode Range Values of Gestures.