|
안녕하세요 볼렌드 C++빌더를 시작한지 얼마 되지 않는 왕초보 입니다.
책을 구하려고 해도 없고 자료를 구하려고 해도 너무 없어서 고생중입니다 ㅠㅠ
맵에디터 아시죠? 그걸 만드려고 하는데 PaintBox에 그림을 그린후 윈도 사이즈를 변경하면
심하게 깜빡 거리네요 ㅜㅜ 왜 그런지 모르겠어요 고수님들의 도움을 절실히 바랍니다
도와주세요~~~
============= 소스 =================
>> ImageView 가 PaintBox입니다
TFormMapMain *FormMapMain;
Graphics::TBitmap*a=new Graphics::TBitmap();
//---------------------------------------------------------------------------
__fastcall TFormMapMain::TFormMapMain(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TFormMapMain::ImageViewPaint(TObject *Sender)
{
a->Width = ImageView->Width;
a->Height = ImageView->Height;
a->Canvas->Brush->Color = clBlack;
a->Canvas->Rectangle(0,0,a->Width, a->Height);
a->Canvas->Pen->Color = clWhite;
for(int i=0;i<a->Width;i+=30){
a->Canvas->MoveTo(i,0);
a->Canvas->LineTo(i,a->Height);
}
for(int i=0;i<a->Height;i+=30){
a->Canvas->MoveTo(0,i);
a->Canvas->LineTo(a->Width,i);
}
BitBlt(ImageView->Canvas->Handle,0,0,a->Width,a->Height, a->Canvas->Handle,0,0,cmSrcCopy);
}
//---------------------------------------------------------------------------
|