用一个TBitmap获取TImageList里的图片,第一次是正确的,第二次开始就不对了.
Graphics::TBitmap * bmp = new Graphics::TBitmap() ;
bmp->PixelFormat = pf24bit ;
for(int s=0 ; s < Form3->il_weather->Count ; s++)
{
Form3->il_weather->GetBitmap( s , bmp ) ;
...
}
delete bmp ;
for(int s=0 ; s < Form3->il_weather->Count ; s++)
{
Graphics::TBitmap * bmp = new Graphics::TBitmap() ;
bmp->PixelFormat = pf24bit ;
Form3->il_weather->GetBitmap( s , bmp ) ;
...
delete bmp ;
}
Graphics::TBitmap *bmp = new Graphics::TBitmap();
bmp->PixelFormat = pf24bit;
for(int s = 0; s < Form3->il_weather->Count; s++)
{
bmp->Assign(NULL);
Form3->il_weather->GetBitmap(s , bmp);
...
}
delete bmp;