Hi, I'm just about ready to tear my hair out with this. I'm trying to draw a "masked" bitmap using CImageList. I've tried just about every combination and everything I can think of. Also, the text books not very clear nor is Microsfts help. Here's the latest piece of code - if someone could tell me where I'm going wrong...
short width = 600;
short height = 94;
POINT pt;
CBitmap bmp;
CBitmap mask;
pt.x = hCtr-(width/2);
pt.y = vCtr-(height/2);
CImageList bList;
bList.Create(width,height,ILC_COLOR | ILC_MASK,2,0);
bmp.LoadBitmap(IDB_CTRLOGO);
bmp.LoadBitmap(IDB_CTRMASK);
bList.Add(&bmp,&mask);
bmp.DeleteObject();
mask.DeleteObject();
bList.Draw(pDC,0,pt,ILD_NORMAL);
I've tried changing background colors, not adding the mask, using ILD_TRANSPARENT etc etc - nothing seems to work. I'm sure it's something really simple I'm missing but my head is clouded at the moment with thoughts of "murder!".
Can anyone help please!?
short width = 600;
short height = 94;
POINT pt;
CBitmap bmp;
CBitmap mask;
pt.x = hCtr-(width/2);
pt.y = vCtr-(height/2);
CImageList bList;
bList.Create(width,height,ILC_COLOR | ILC_MASK,2,0);
bmp.LoadBitmap(IDB_CTRLOGO);
bmp.LoadBitmap(IDB_CTRMASK);
bList.Add(&bmp,&mask);
bmp.DeleteObject();
mask.DeleteObject();
bList.Draw(pDC,0,pt,ILD_NORMAL);
I've tried changing background colors, not adding the mask, using ILD_TRANSPARENT etc etc - nothing seems to work. I'm sure it's something really simple I'm missing but my head is clouded at the moment with thoughts of "murder!".
Can anyone help please!?