ResultOptions Example for C++ 5.0 and later
void CSample_COMDlg::OnButton22()
{
pRasterDoc->EnableSaveResultsToMemory = FALSE;
pRasterDoc->RecognitionDataFileName = "c:\\test.rdf";
pRasterDoc->SpellLanguageID = LANGID_ENGLISH;
int nRet = pRasterDoc->Recognize (0, 1);
if (nRet == 0)
{
pRasterDoc->GetRecognitionResultOptions ();
pRasterDoc->GetResultOptions ()->Format = DOCRTF_WORD_2000;
pRasterDoc->GetResultOptions ()->FormatLevel = FORMATLEVEL_FULL;
pRasterDoc->GetResultOptions ()->GetDocumentOptions ()->PaperSizeMode = SELPREDEFINED;
pRasterDoc->GetResultOptions ()->GetDocumentOptions()->PaperType = PAPER_A4;
pRasterDoc->GetResultOptions ()->GetDocumentOptions()->MarginsMode = SELAUTO;
pRasterDoc->GetResultOptions ()->GetDocumentOptions()->LanguageMode = SELAUTO;
pRasterDoc->GetResultOptions ()->GetDocumentOptions()->ResultLanguage = LANGOUT_ENGLISH_US;
pRasterDoc->SetRecognitionResultOptions ();
nRet = pRasterDoc->SaveDocument ("c:\\test.doc");
if (nRet == 0)
AfxMessageBox(TEXT("The recognition results were saved to a file."));
}
}