Is it possible to create a CImageList with alpha blending transparency?
Posted
by Sorin Sbarnea
on Stack Overflow
See other posts from Stack Overflow
or by Sorin Sbarnea
Published on 2010-04-14T20:31:41Z
Indexed on
2010/04/14
20:33 UTC
Read the original article
Hit count: 391
I would like to knwo if it is possible to create a CImageList with alpha blending transparency.
Sample code that creates a CImageList with ugly transparency (no alpha blending)
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));
© Stack Overflow or respective owner