CImageList* pImageList;
pImageList = new CImageList();
pImageList->Create(43, 14, ILC_COLOR32, 5, 5);
CBitmap bmp;
bmp.LoadBitmap(IDB_signal4);
pImageList->Add(&bmp, RGB(0, 0, 0));
bmp.DeleteObject();
bmp.LoadBitmap(IDB_signal5);
pImageList->Add(&bmp, RGB(0, 0, 0));
m_pic.SetBitmap(bmp);现在有一个picture控件m_pic,我想在m_pic.SetBitmap(bmp);中显示第2个BMP应该怎么办?最简单的方法是什么?
pImageList = new CImageList();
pImageList->Create(43, 14, ILC_COLOR32, 5, 5);
CBitmap bmp;
bmp.LoadBitmap(IDB_signal4);
pImageList->Add(&bmp, RGB(0, 0, 0));
bmp.DeleteObject();
bmp.LoadBitmap(IDB_signal5);
pImageList->Add(&bmp, RGB(0, 0, 0));
m_pic.SetBitmap(bmp);现在有一个picture控件m_pic,我想在m_pic.SetBitmap(bmp);中显示第2个BMP应该怎么办?最简单的方法是什么?
HBITMAP hb;
IMAGEINFO imageInfo;
pImageList->GetImageInfo(1,&imageInfo);
hb=imageInfo.hbmImage;
m_pic.SetBitmap(hb); //m_pic为图片框仍然不能正确显示,但跟踪hb发现,其值是根据GetImageInfo(int,&imageInfo);中的int变化而变化的