OCXBitmap example for C++ Builder
long lRet;
// assign the bitmap for OCR
LEADOCR1->Bitmap = LeadImage1->OCXBitmap;
lRet = LEADOCR1->RecognizeOCR(OCRFLAG_CALLBACK_AUTO);
Screen->Cursor = crDefault;
if(lRet != 0)
{
MessageBox(NULL, "Error during recognition", "Error", MB_OK);
LEADOCR1->ClearDoc(); // clear the document
}