AutoCorrectProc callback function
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
int WINAPI 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
|
Minimum supported client | Windows 8 [desktop apps only] |
|---|---|
|
Minimum supported server | Windows Server 2012 [desktop apps only] |
|
Header |
|
See also
Send comments about this topic to Microsoft
Build date: 10/27/2012