?? unit1.~cpp
字號:
Form15=new TForm15(this);
Form15->ShowModal();
if(!iReturnValue)
return;
rnew.Left=0;
rnew.Top=0;
rnew.Right=iNewWidth;
rnew.Bottom=iNewHeight;
Shape3->Brush->Color=tGroundColor;
sFileName="新建";
bImagetemp->Width=iNewWidth;
bImagetemp->Height=iNewHeight;
bImagetemp->Canvas->Brush->Color=tGroundColor;
bImagetemp->Canvas->FillRect(rnew);
f_CreatePalette();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::N63Click(TObject *Sender)
{
bFullCopy=false;
Form16 = new TForm16(this);
Form16->ShowModal();
if(!iReturnValue)
return;
f_CopyScreen();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::N62Click(TObject *Sender)
{
bFullCopy=true;
Form16 = new TForm16(this);
Form16->ShowModal();
if(!iReturnValue)
return;
f_CopyScreen();
}
//---------------------------------------------------------------------------
//截屏
void TForm1::f_CopyScreen()
{
int i;
if(iCopyDestop<10)
{
this->WindowState=wsMaximized;
this->WindowState=wsMinimized;
Sleep(100);
}
if(iCopyDestop==2||iCopyDestop==12)
{
Screen->Cursor=crCross;
Form17->ShowModal(); //此時桌面實(shí)際已變成backwindow背景底圖
Sleep(200);
}
else
{
pProcessBegin.x=pProcessBegin.y=0;
pProcessEnd.x=Screen->Width;
pProcessEnd.y=Screen->Height;
}
if(iCopyDestop<10)
this->WindowState=wsMinimized;
iNewWidth=pProcessEnd.x-pProcessBegin.x;
iNewHeight=pProcessEnd.y-pProcessBegin.y;
HDC hdc =::GetDC(0);
delete bImagetemp;
bImagetemp = new Graphics::TBitmap();
//創(chuàng)建一兼容于裝置的新圖文件,并指派給tmpBmp handle
bImagetemp->Handle = ::CreateCompatibleBitmap( hdc, iNewWidth, iNewHeight);
//將hdc獲取到的內(nèi)容復(fù)制至tempBmp中
::BitBlt(bImagetemp->Canvas->Handle, 0, 0,
iNewWidth, iNewHeight,hdc, pProcessBegin.x, pProcessBegin.y, SRCCOPY);
sFileName="截屏";
f_CreatePalette(); //創(chuàng)建畫板
if(iCopyDestop<10)
this->WindowState=wsNormal;
if(iCopyDestop==2||iCopyDestop==12)
Screen->Cursor = crDefault;
}
void __fastcall TForm1::N48Click(TObject *Sender) //rnew
{
if(bForm2Null[iActForm2]||iGraphStyle!=1)
return;
fForm2Array[iActForm2]->f_imageCopy(pProcessBegin.x,pProcessBegin.y,pProcessEnd.x-pProcessBegin.x,pProcessEnd.y-pProcessBegin.y);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::RadioButton1Click(TObject *Sender)
{
if(iGraphStyle==100)
return;
if(RadioButton1->Checked)
iGraphStyle=100;
setcur(12);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::RadioButton2Click(TObject *Sender)
{
if(iGraphStyle==101)
return;
if(RadioButton2->Checked)
iGraphStyle=101;
setcur(13);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::SpeedButton1Click(TObject *Sender)
{
if(bForm2Null[iActForm2])
return;
N17Click(Sender);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::SpeedButton2Click(TObject *Sender)
{
N2Click(Sender);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::SpeedButton3Click(TObject *Sender)
{
N3Click(Sender);
}
//---------------------------------------------------------------------------
void TForm1::f_SetForm2ChooseFalse()
{
if(bForm2Null[iActForm2])
return;
fForm2Array[iActForm2]->Shape1->Visible=false;
pProcessBegin.x=0;
pProcessBegin.y=0;
pProcessEnd.x=fForm2Array[iActForm2]->lPicWidth;
pProcessEnd.y=fForm2Array[iActForm2]->lPicHeight;
}
void __fastcall TForm1::ComboBox1Change(TObject *Sender)
{
if(ComboBox1->ItemIndex==0)
iPointRange=0;
else if(ComboBox1->ItemIndex==1)
iPointRange=1;
else if(ComboBox1->ItemIndex==2)
iPointRange=2;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::N49Click(TObject *Sender)
{
if(bForm2Null[iActForm2])
return;
fForm2Array[iActForm2]->Image2->Picture->Bitmap->Assign(Form1->Image1->Picture->Bitmap);
fForm2Array[iActForm2]->Image2->Left=0;
fForm2Array[iActForm2]->Image2->Top=0;
fForm2Array[iActForm2]->Image2->Visible=true;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::N59Click(TObject *Sender)
{
if(bForm2Null[iActForm2])
return;
fForm2Array[iActForm2]->f_iamgePaste();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::N65Click(TObject *Sender)
{
lCopyStyle=SRCCOPY;
N65->Checked=true;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::N66Click(TObject *Sender)
{
lCopyStyle=NOTSRCCOPY;
N66->Checked=true;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::OR1Click(TObject *Sender)
{
lCopyStyle=MERGEPAINT;
OR1->Checked=true;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::OR3Click(TObject *Sender)
{
lCopyStyle=SRCPAINT;
OR3->Checked=true;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::OR2Click(TObject *Sender)
{
lCopyStyle=NOTSRCERASE;
OR2->Checked=true;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::AND1Click(TObject *Sender)
{
lCopyStyle=SRCERASE;
AND1->Checked=true;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::XOR1Click(TObject *Sender)
{
lCopyStyle=SRCINVERT;
XOR1->Checked=true;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::N42Click(TObject *Sender)
{
if(bForm2Null[iActForm2])
return;
int i,j;
iTNum=4;
for(i=0;i<4;i++)
for(j=0;j<4;j++)
iTemplate[i][j]=1;
fForm2Array[iActForm2]->f_imageSmoothProcess(5);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::N38Click(TObject *Sender)
{
if(bForm2Null[iActForm2])
return;
int i,j;
iTNum=4;
for(i=0;i<4;i++)
for(j=0;j<4;j++)
iTemplate[i][j]=1;
fForm2Array[iActForm2]->f_imageSmoothProcess(6);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::N68Click(TObject *Sender)
{
iMASAIKE=3;
N68->Checked=true;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::N69Click(TObject *Sender)
{
iMASAIKE=4;
N69->Checked=true;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::N70Click(TObject *Sender)
{
iMASAIKE=5;
N70->Checked=true;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::N39Click(TObject *Sender)
{
if(bForm2Null[iActForm2])
return;
Form19=new TForm19(this);
Form19->ShowModal();
if(iReturnValue)
fForm2Array[iActForm2]->f_imageExposureProcess(iExposureColor);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::N45Click(TObject *Sender)
{
if(FileExists(helpadd))
ShellExecute (0, "open",helpadd.c_str(), "", "", SW_SHOWNORMAL);
else
MessageBox(NULL,"錯誤:幫助文件找不到","打開幫助失敗",MB_OK);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::N55Click(TObject *Sender)
{
if(bForm2Null[iActForm2])
return;
fForm2Array[iActForm2]->f_imageAllChoose(true);
}
//---------------------------------------------------------------------------
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -