为什么我不能实现在Pandel上加载图片?(有源码帮看下)
TPanel *panel;
panel=new TPanel(this);
panel->Parent=main; //main是主程序窗口
panel->Left=1;
panel->Top=50;
panel->Widht=Width/12;
panel->Height=Height-50;
//以下是加载图片
HDC hdc;
Graphics::TBitmap *bitmap=new Graphics::TBitmap();
bitmap->LoadFromFile("c:\\1.bmp");
hdc=GetDC(panel->Handle);
::StretchBlt(hdc,0,0,panel->Width,panel->Height,Bitmap->Canvas->Handle,0,0,Bitmap->Width,Bitmap->Height,SRCCOPY);