myttof.cpp

来自「将文本txt格式转换为tif图像格式的范例程序」· C++ 代码 · 共 54 行

CPP
54
字号
//---------------------------------------------------------------------------
#include <dos.h>
#include <time.h>
#include <stdlib.h>
#include <stdio.h>
//
//#include "tiff.h"
#include <vcl.h>
#pragma hdrstop

#include "myttof.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
#ifdef __cplusplus
extern "C" {
#endif
//
__declspec( dllexport ) short int WINAPI TextToTiff(const char* inputfile, const char* outputfile, unsigned short resolution);
//__declspec( dllexport ) short int __stdcall Read_ASCII (void);
//
#ifdef __cplusplus
}
#endif

//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
        : TForm(Owner)
{
}
//---------------------------------------------------------------------------

void __fastcall TForm1::FormShow(TObject *Sender)
{
s_time->Clear();
e_time->Clear();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::okClick(TObject *Sender)
{
s_time->Text=TimeToStr(Time());
//Read_ASCII();
TextToTiff("\\icd_server\icdconfig\is\localfiles\file0401.txt","\\icd_server\icdconfig\is\localfiles\file0401.tif",1);
e_time->Text=TimeToStr(Time());
}
//---------------------------------------------------------------------------
void __fastcall TForm1::closeClick(TObject *Sender)
{
Close();        
}
//---------------------------------------------------------------------------

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?