unit11.h
来自「光学仪器的控制系统 用于教学和科研的仪器」· C头文件 代码 · 共 90 行
H
90 行
//---------------------------------------------------------------------------
#ifndef PRINTH
#define PRINTH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include <Graphics.hpp>
#include "Printers.hpp"
//---------------------------------------------------------------------------
class TFormPrntSetting : public TForm
{
__published: // IDE-managed Components
TEdit *EditLeft;
TLabel *Label1;
TEdit *EditRight;
TLabel *Label2;
TEdit *EditTop;
TLabel *Label3;
TCheckBox *CBBegin;
TCheckBox *CBPara;
TGroupBox *GroupBox1;
TImage *IMPre;
TButton *BTPrint;
TImage *IMInfo;
TImage *IMChar;
TImage *IMTime;
TCheckBox *CBChangInfo;
TLabel *Label4;
TLabel *Label5;
TLabel *Label6;
TLabel *Label7;
TEdit *EditPutuHeight;
TLabel *Label8;
TLabel *Label9;
TEdit *EditPutuWidth;
TLabel *Label10;
TButton *BTCancel;
TCheckBox *CBPrnFJ;
TCheckBox *CBPrnFG;
TCheckBox *CBPrnData;
void __fastcall BTPrintClick(TObject *Sender);
void __fastcall FormCreate(TObject *Sender);
void __fastcall SettingChang(TObject *Sender, WORD &Key,
TShiftState Shift);
void __fastcall FormShow(TObject *Sender);
void __fastcall ChooseChang(TObject *Sender);
void __fastcall BTCancelClick(TObject *Sender);
void __fastcall EditChange(TObject *Sender);
void __fastcall CBPrnFJClick(TObject *Sender);
void __fastcall CBPrnFGClick(TObject *Sender);
void __fastcall CBPrnDataClick(TObject *Sender);
private: // User declarations
float fLeft,fRight,fTop,fPutuHeight,fPutuWidth;
int iLeft,iRight,iTop,iPutuHeight,iPutuWidth;
float fPageWidth,fPageHeight;
bool bPrnDate,bPrnInfo;
TPrinter *pPrinter;//打印机
int PixelsPerInchX;
int PixelsPerInchY;
double PixelsPerCmX;
double PixelsPerCmY;
TImage *IMView;
TImage *Image1;
TPrinter *pPrinter1;
bool m_bPrnFJ, m_bPrnFG, m_bPrnData;
float *m_PrnDataBuff;
int m_PrnDataBuffLen;
int m_DataNum;
void GetSetting(void);
void PreView(int iMod);//画预览图
void Print(void);
void GetPutuWidth(void);
void ReFreshPreview(void);//刷新预览图
public: // User declarations
__fastcall TFormPrntSetting(TComponent* Owner);
__fastcall ~TFormPrntSetting();
void PrintFJ(bool bs);
void PrintFG(bool bs);
void PrintData(bool bs);
};
//---------------------------------------------------------------------------
extern PACKAGE TFormPrntSetting *FormPrntSetting;
//---------------------------------------------------------------------------
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?