#include "ltdoc2.h"
L_LTDOC2_API L_INT L_Doc2GetSelectedLanguagesExt(hDoc, nDocId, ppLangIds, pnLangCount)
Gets the currently selected languages.
Handle to the OCR document.
Document ID created by calling L_Doc2CreateDocument.
Pointer to a DOC2_LANGIDS array to be filled with the currently 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.
L_Doc2GetSelectedLanguagesExt allocates memory for ppLangIds. To free the ppLangIds parameter, call the L_Doc2FreeLanguages function.
To get the character options for the currently activated languages, call the L_Doc2GetCharLangsOptions / L_Doc2GetCharLangsOptionsExt function.
To set the character options for the currently activated languages, call the L_Doc2SetCharLangsOptions / L_Doc2SetCharLangsOptionsExt function.
Required DLLs and Libraries
L_INT Doc2GetSelectedLanguagesExampleExt(L_HDOC2 hDoc, L_INT nDocId)
{
L_INT nRet;
DOC2_LANGIDS * pLangIds = NULL;
L_INT nLangCount = 0;
nRet = L_Doc2GetSelectedLanguagesExt(hDoc, nDocId, &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;
}