Share via


SplLimitSet

This function sets a spelling error tolerance that an applications automatic replace feature can use. When a misspelling exceeds the error tolerance, the spelling checker does not return suggestions for the misspelled word.

int SplLimitSet ( 
HSPL hspl, 
DWORD dw );

Parameters

  • hspl
    Handle to the spelling session. An application initiates a spelling session by calling the SplInit function, which then generates this handle.

  • dw
    Specifies the error tolerance.

    The spelling errors in the following list are ordered from the least severe to the most severe. The spelling checker does not provide a suggestion when it encounters either the specified error type or any error more severe than the set limit.

    The dw parameter is one of the following error types:

    Value Description
    SPL_LIMIT_NONE The only spelling suggestion returned is for a word that is correctly spelled one way. For example, the suggestion for i is I, and the suggestion for thier is their.
    SPL_LIMIT_CAPITAL An error is corrected by capitalizing the initial letter of the word.
    SPL_LIMIT_DROP_DOUBLE_CONSONANT An error is corrected by substituting a double consonant for a single consonant.
    SPL_LIMIT_ADD_DOUBLE_CONSONANT An error is corrected by substituting a single consonant for a double consonant.
    SPL_LIMIT_TRANSPOSE_VOWEL An error is corrected by transposing two vowels.
    SPL_LIMIT_DROP_DOUBLE_VOWEL An error is corrected by substituting a single vowel for a double vowel.
    SPL_LIMIT_ADD_DOUBLE_VOWEL An error is corrected by substituting a double vowel for a single vowel.
    SPL_LIMIT_TRANSPOSE_CONSONANT An error is corrected by transposing two consonants.
    SPL_LIMIT_TRANSPOSE An error is corrected by transposing any two letters.
    SPL_LIMIT_SUBSTITUTE_VOWEL An error is corrected by substituting a vowel for another vowel.
    SPL_LIMIT_DROP An error is corrected by dropping a letter.
    SPL_LIMIT_ADD An error is corrected by adding a letter.
    SPL_LIMIT_SUBSTITUTE_CONSONANT An error is corrected by substituting a consonant for another consonant.
    SPL_LIMIT_SUBSTITUTE An error is corrected by substituting a letter for another letter.

Return Values

1 indicates success. 0 indicates failure.

Remarks

Typically, automatic replacement features set a low error tolerance limit; for instance, at SPL_LIMIT_NONE or SPL_LIMIT_CAPITAL.

In addition to setting an error limit for an automatic replace feature, the error types listed for dw are used to score suggestions that the spelling checker returns to the output buffer of the SPLBUFFER structure. For more information about scoring suggestions, see SplSuggest and SPLSUGGEST.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.10 and later Splapi.h   Splusa.lib

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

SPLBUFFER, SplInit, SplLimitGet, SplReplace, SPLSUGGEST

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.