📄 unit1.~cpp
字号:
//---------------------------------------------------------------------------
#include <vcl.h>
#include <b_g3sdecod.h>
#pragma hdrstop
#include "Unit1.h"
#include "ImageInput.h"
#include "About.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
FILE *f;
short ImageWidth=-1,ImageHeight=-1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::MHE1Click(TObject *Sender)
{
if ((ImageWidth==-1)||(ImageHeight==-1))
{
if (OKBottomDlg->ShowModal() == mrOk)
{
MessageBeep(0);
}
else
{
return;
}
}
Image1->Width=ImageWidth*10+ImageWidth*3+20; // width pixel*10 + width * text 3 +addtion
Panel1->Width=Image1->Width;
Image1->Height=ImageHeight*20+30;
Panel1->Height= Image1->Height;
Image1->Canvas->FillRect(Rect(0,0,Image1->Width,Image1->Height));
if (NULL==(f=fopen("tables.dat","r+b")))
{
printf("file error!\n");
}
b_g3i_initialize(decode_next_byte,decode_new_row,decode_white,decode_black,ImageWidth,ImageHeight);
b_g3i_decode();
fclose(f);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Open1Click(TObject *Sender)
{
OKBottomDlg->ShowModal();
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -