답변 감사합니다. 추가로 질문을 드리자면.
TForm1에서 ImageFileName을 받으려고 하는데요.
Image1MouseMove() 변수로는 추가가 안 되네요.
어떤 방법을 사용해야 하는지요...
: void __fastcall TForm1::Button1Click(TObject *Sender)
: {
:
: MyImage *Img=new MyImage(Panel1);
: Img->ImageFileName="C:\\Test.bmp";
:
: Img->OnMouseMove = Image1MouseMove;
: }
: //---------------------------------------------------------------------------
:
: void __fastcall TForm1::Image1MouseMove(TObject *Sender, TShiftState Shift,
: int X, int Y)
: {
: Label1->Caption="( "+IntToStr(X)+" , "+IntToStr(Y)+" )";
: }
|