#include "ltdoc2.h"
L_LTDOC2_API L_INT EXT_FUNCTION L_Doc2GetSelectedLanguages(hDoc, ppLangIds, pnLangCount)
Gets the current selected languages.
Handle to the OCR document.
Pointer to a DOC2_LANGIDS array to be filled with the current selected languages.
Pointer to an integer to be updated with the number of selected languages in ppLangIds.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
To activate recognized languages, call the L_Doc2SelectLanguages / L_Doc2SelectLanguagesExt function.
This function will allocate memory for ppLangIds. To free the ppLangIds parameter, call the L_Doc2FreeLanguages function.
To get the character options for the current activated languages, call the L_Doc2GetCharLangsOptions / L_Doc2GetCharLangsOptionsExt function.
To set the character options for the current activated languages, call the L_Doc2SetCharLangsOptions / L_Doc2SetCharLangsOptionsExt function.
Required DLLs and Libraries
L_INT Doc2GetSelectedLanguagesExample(L_HDOC2 hDoc)
{
L_INT nRet;
DOC2_LANGIDS * pLangIds = NULL;
L_INT nLangCount = 0;
nRet = L_Doc2GetSelectedLanguages(hDoc, &pLangIds, &nLangCount);
if (nRet != SUCCESS)
return nRet;
for (L_INT i=0; i<nLangCount; i++)
{
if (pLangIds[i] == DOC2_LANG_ID_ENGLISH)
MessageBox(NULL, TEXT("English is the active language."), TEXT("Notice!"), MB_OK);
}
nRet = L_Doc2FreeLanguages (hDoc, &pLangIds);
return nRet;
}