SetGlobalRC
1.0 2.0
Sets the
current default settings for the global RC
Note This function
is provided only for compatibility with version 1.0 of the Pen API and will not
be supported in future versions.
UINT SetGlobalRC( LPRC lprc, LPSTR lpszDefRecog,
LPSTR lpszDefDict )
Parameters
lprc
Address of an
RC
lpszDefRecog
Address of
string specifying the name of the default recognizer module (maximum 128
bytes).
lpszDefDict
Address of a
string specifying the default dictionary path. The list should end with two
null characters.
Return Value
Returns the
value SGRC_OK if successful. If an error occurs, the return value consists of
one or more of the following values, combined using the bitwise-OR operator.
Constant |
Description |
SGRC_USER |
An invalid
user name was found in the supplied RC |
SGRC_PARAMERROR |
One or more
invalid parameters were detected. The call to SetGlobalRC has no
effect. |
SGRC_RC |
The
supplied recognition context lprc has entries, other than the user
name, that contain invalid settings for a global recognition context. The
supplied recognition context is ignored. |
SGRC_RECOGNIZER |
The
supplied recognizer module name lpszDefRecog is invalid or the
recognizer cannot be loaded. The supplied recognizer module name is ignored. |
SGRC_DICTIONARY |
The
supplied dictionary path lpszDefDict is invalid or some dictionaries
on the path cannot be loaded. The supplied dictionary path is ignored. |
SGRC_INIFILE |
An error
was encountered while saving the new global recognition context settings to
the pen section of the system registry. The new settings are lost after
rebooting Windows. |
Comments
Because the
default RC
Any of the
parameters can be NULL to indicate that the calling application does not want
the value changed.
SetGlobalRC uses only the following members of the RC
structure pointed to by the lprc parameter:
clErrorLevel lPcm (PCM_TIMEOUT and PCM_RANGE bits) lpLanguage lpUser nInkWidth
rgbInk wCountry wIntlPreferences wRcDirect wRcPreferences
wTimeOut wTryDictionary
When InitRC
When a
version 1.0 application receives a WM_PENMISCINFO message, it should call ConfigRecognizer
SetGlobalRC does not save the RCP_MAPCHAR flag in the wRcPreferences
member of the RC structure to the system registry. The RCP_MAPCHAR flag
is reflected in the global RC for the current session only.
See Also