Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The AutoCorrectProc function is an application-defined callback function that is used with the EM_SETAUTOCORRECTPROC message.
AutoCorrectProc is a placeholder for the application-defined function name. It provides application-defined automatic error correction for text entered into a rich edit control.
Syntax
AutoCorrectProc Autocorrectproc;
int Autocorrectproc(
LANGID langid,
const WCHAR *pszBefore,
WCHAR *pszAfter,
LONG cchAfter,
LONG *pcchReplaced
)
{...}
Parameters
langid
Type: LANGID
Language ID that identifies the autocorrect file to use for automatic correcting.
pszBefore
Type: const WCHAR*
Autocorrect candidate string.
pszAfter
Type: WCHAR*
Resulting autocorrect string, if the return value is not ATP_NOCHANGE.
cchAfter
Type: LONG
Count of characters in pszAfter.
pcchReplaced
Type: LONG*
Count of trailing characters in pszBefore to replace with pszAfter.
Return value
Type: int
Returns one or more of the following values.
Return code/value | Description |
---|---|
|
No change. |
|
Change but don’t replace most delimiters, and don’t replace a span of unchanged trailing characters (preserves their formatting). |
|
Change but don’t replace a span of unchanged trailing characters. |
|
Replace trailing characters even if they are not changed (uses the same formatting for the entire replacement string). |
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8 [desktop apps only] |
Minimum supported server | Windows Server 2012 [desktop apps only] |
Target Platform | Windows |
Header | richedit.h |