1 //---------------------------------------------------------------------------
6 #include "OCRTextFrm.h"
8 //---------------------------------------------------------------------------
9 #pragma package(smart_init)
10 #pragma link "TntStdCtrls"
11 #pragma link "TntStdCtrls"
12 #pragma resource "*.dfm"
13 TOCRTextForm *OCRTextForm;
14 const char *sOCRText = "OCRText";
15 //---------------------------------------------------------------------------
16 __fastcall TOCRTextForm::TOCRTextForm(TComponent* Owner)
21 //---------------------------------------------------------------------------
22 void __fastcall TOCRTextForm::FormShow(TObject *Sender)
24 LoadForm(sOCRText, this, NULL);
26 //---------------------------------------------------------------------------
27 void __fastcall TOCRTextForm::FormCloseQuery(TObject *Sender,
30 SaveForm(sOCRText, this, NULL);
32 //---------------------------------------------------------------------------
33 void TOCRTextForm::SetText(const wchar_t *text)
35 int wlen = wcslen(text);
36 char *buf = new char[wlen*2+1];
39 WideCharToMultiByte( CP_ACP, 0,
41 buf, wlen*2+1, 0, &defchar );