604
社区成员




void __fastcall CrnAddTImageToImageList(TImage *img, TImageList *il)
{
Graphics::TBitmap *bmp = new Graphics::TBitmap;
bmp->Width = 30;
bmp->Height = 30;
bmp->Canvas->StretchDraw(TRect(0, 0, 30, 30), img->Picture->Graphic);
il->Add(bmp, NULL);
delete bmp;
}
// ---------------------------------------------------------------------------
//
void __fastcall TForm1::Button1Click(TObject *Sender)
{
CrnAddTImageToImageList(Image1, ImageList1);
}
http://bbs.csdn.net/topics/360105721