[b][red]This message was edited by chick80 at 2002-8-31 2:15:57[/red][/b][hr]
I'm writing a program that uses owner-drawn buttons.
I want to use an true color bitmap with transparency for a button.
This is the code I've written
draw = (LPDRAWITEMSTRUCT) lParam;
case IDC_ADD: // I want this button to display the bitmap
hbmp = LoadBitmap(hInst, MAKEINTRESOURCE(IDB_PLUS));
hcomp = CreateCompatibleDC(draw->hDC);
BitBlt(draw->hDC, 0, 0, draw->rcItem.right, draw->rcItem.bottom,
hcomp, 0, 0, SRCAND);
If I use SRCAND in BitBlt I have the transparency, but colors are ugly... if I use SRCCOPY I have very nice 32 bit colors... but no transparency.
What's the trick to have 32 bit colors && transparency???
Tnx in advance