将图像剪切到剪切板中遇到的问题
下面是我自己写的程式:
void __fastcall TForm1::Cut1Click(TObject *Sender) //从Image1上剪切图像{Clipboard() -> Assign(Image1 -> Picture);Image1 -> Picture -> Assign(NULL);}
void__fastcall TForm1::Cut1Click(TObject *Sender){TRect ARect;Clipboard() -> Assign(Image -> Picture); //拷贝到剪切板Image -> Canvas -> CopyMode = cmWhiteness; //剪切后设为白色ARect = Rect(0, 0, Image -> Width, Image -> Height); //拷贝对象Image -> Canvas -> CopyRect(ARect, Image -> Canvas, ARect); //在自身上拷贝Image -> Canvas -> CopyMode = cmSrcCopy; //恢复默认拷贝模式}