|
Graphics::TBitmap * bmp = new Graphics::TBitmap;
TImage *img1, *img2;
if( ( dynamic_cast<TImage *>(Source) != NULL ) && ( dynamic_cast<TImage *>(Sender) != NULL ) )
{
img1 = (TImage *)Source;
img2 = (TImage *)Sender;
bmp->Assign(img1);
img1->Assign(img2);
img2->Assign(bmp);
}
delete bmp;
bmp = NULL;
이렇게 하면 될려나? 테스트 안해봤어요~
아마도 이런 식으로 하시면 될껍니다~ ㅡ,ㅡ;;; 즐푸~
박천은 님이 쓰신 글 :
: procedure TForm1.Image1DragDrop(Sender, Source: TObject; X, Y: Integer);
: begin
:
: if (Source is Timage) and (Sender is TImage) then
: begin
: // 비트맵 받고
: Bitmap.Assign((Sender as TImage).Picture.Bitmap);
: // 비트맵 바꾸고
: (Sender as TImage).Picture := (Source as TImage).Picture;
: // 바꾼거 주고
: (Source as TImage).Picture.Bitmap.Assign(Bitmap);
: end;
:
: end;
|