L_DocGetSelectedLanguages
#include "ltdoc.h"
L_LTDOC_API L_INT L_DocGetSelectedLanguages(hDoc, ppLangIds, pnLangCount)
L_HDOC hDoc; |
/* handle to the OCR document */ |
LANGIDS ** ppLangIds; |
/* pointer to an array to be updated */ |
L_INT * pnLangCount; |
/* pointer to a variable to be updated */ |
Gets the current selected languages.
Parameter |
Description |
hDoc |
Handle to the OCR document. |
ppLangIds |
Pointer to a LANGIDS array to be filled with the current selected languages. |
pnLangCount |
Pointer to an integer to be updated with the number of selected languages in ppLangIds. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
Retrieves the current language selection.
To activate recognized languages, call L_DocSelectLanguages function.
This function will allocate memory for ppLangIds. To free the ppLangIds parameter, call L_DocFreeLanguages.
To get the character options for the current activated languages, call L_DocGetCharLangsOptions.
To set the character options for the current activated languages, call L_DocSetCharLangsOptions.
Required DLLs and Libraries
LTDOC For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
See Also
Functions: |
L_DocSelectLanguages, L_DocFreeLanguages, L_DocSetCharLangsOptions, L_DocGetCharLangsOptions, L_DocIsCharEnabled, L_DocGetDefaultSpellLanguages |
Topics: |
|
|
Example
L_INT DocGetSelectedLanguagesExample(L_HDOC hDoc) { L_INT nRet; LANGIDS * pLangIds = NULL; L_INT nLangCount = 0; nRet = L_DocGetSelectedLanguages(hDoc, &pLangIds, &nLangCount); if (nRet != SUCCESS) return nRet; for (L_INT i=0; i<nLangCount; i++) { if (pLangIds[i] == LANG_ID_ENGLISH) MessageBox(NULL, TEXT("English is the active language."), TEXT("Notice!"), MB_OK); } nRet = L_DocFreeLanguages (hDoc, &pLangIds); if(nRet != SUCCESS) return nRet; if (L_DocIsCharEnabled(hDoc, L'a') == TRUE) MessageBox(NULL, TEXT("The specified character is available in the selected languages."), TEXT("Notice!"), MB_OK); else MessageBox(NULL, TEXT("The specified character is not available in the selected languages."), TEXT("Notice!"), MB_OK); return SUCCESS; }