📄 unit4.~cpp
字号:
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit4.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm4 *Form4;
extern float fWr,fWg,fWb; //加权平均图像处理参数
extern int iReturnValue;
//---------------------------------------------------------------------------
__fastcall TForm4::TForm4(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm4::BitBtn1Click(TObject *Sender)
{
fWr=StrToFloat(MaskEdit1->Text);
fWg=StrToFloat(MaskEdit2->Text);
fWb=StrToFloat(MaskEdit3->Text);
if((fWr+fWg+fWb)>1.01||(fWr+fWg+fWb)<0.99)
{
MessageBox(NULL,"错误,应符合此要求:Wr+Wg+Wb=1","error!",MB_OK);
}
else
{
iReturnValue=1;
this->Close();
}
}
//---------------------------------------------------------------------------
void __fastcall TForm4::FormShow(TObject *Sender)
{
iReturnValue=0;
}
//---------------------------------------------------------------------------
void __fastcall TForm4::BitBtn2Click(TObject *Sender)
{
this->Close();
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -