?? unit1.cpp
字號(hào):
//---------------------------------------------------------------------------
#include <vcl.h>
#include <lzexpand.h>
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
WinExec("Compress demo.mdb demo.ddd",SW_HIDE);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button2Click(TObject *Sender)
{
int sf,df;
long nn;
OFSTRUCT s_OFSTRUCT,d_OFSTRUCT;
sf=LZOpenFile("demo.ddd",&s_OFSTRUCT,OF_READ);
if(sf==-1)
ShowMessage("源文件打開錯(cuò)誤!");
df=LZOpenFile("demo1.mdb",&d_OFSTRUCT,OF_CREATE);
if(df==-1)
ShowMessage("目標(biāo)文件打開錯(cuò)誤!");
nn=LZCopy(sf,df);
if(nn<0)
ShowMessage("壓縮文件復(fù)制錯(cuò)誤!");
LZClose(sf);
LZClose(df);
ShowMessage("壓縮文件成功復(fù)制!");
}
//---------------------------------------------------------------------------
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -