Freigeben über


SetGuide Function

SetGuide Function

Sets the guide to use for boxed or lined input. You must call this function before you add strokes to the context.

Syntax

[C++]

HRESULT WINAPI SetGuide(
  HRECOCONTEXT hrc,
  const RECO_GUIDE *pGuide,
  ULONG iIndex
);

Parameters

hrc

[in] Handle to the recognizer context.

pGuide

[in] Guide to use for box or line input. Setting pGuide == NULL means that the context has no guide. This is the default and means the recognizer is in free input mode. For guide details, see the RECO_GUIDE structure.

iIndex

[in] Index value to use for the first box or line in the context. This index is used when a function calls the GetGuideIndex function. The guide boxes are numbered based on this setting.

Return Value

HRESULT value Description
S_OK Success.
E_POINTER The context is invalid or one of the parameters is an invalid pointer.
E_OUTOFMEMORY Unable to allocate memory to complete the operation.
E_INVALIDARG Attempted to set a recognition mode (free, lined, boxed, etc.) that is not supported by the recognizer, or the RECO_GUIDE field values are illegal (negative heights or widths, for example).
E_FAIL An unspecified error occurred.
TPC_E_OUT_OF_ORDER_CALL Attempted to set guide when there was already some ink in the reco context, or, in the case of East Asian recognizers, SetCACMode was called previously.

Remarks

Guide boxes are numbered based on the iIndex value.