sor*_*rin 5 c++ mfc image alphablending mfc-feature-pack
如果可以创建具有alpha混合透明度的CImageList,我想知道.
创建具有丑陋透明度的CImageList的示例代码(无alpha混合)
CGdiPlusBitmapResource m_pBitmap;
m_pBitmap.Load(IDB_RIBBON_FILESMALL,_T("PNG"),AfxGetResourceHandle());
HBITMAP hBitmap;
m_pBitmap.m_pBitmap->GetHBITMAP(RGB(0,0,0),&hBitmap );
CImageList *pList=new CImageList;
CBitmap bm;
bm.Attach(hBitmap);
pList->Create(16, 16, ILC_COLOR32 | ILC_MASK, 0, 4);
pList->Add(&bm, RGB(255,0,255));
Run Code Online (Sandbox Code Playgroud)