views:

32

answers:

1

I was drawing a bitmap on the screen, and i wanted to set a transparent color on this bitmap (0xFFFFFF White) i wanted to know if its possible, and if it is, how to do so xP

I use this code to load the bitmap

invoke LoadBitmap,eax,10
push eax
invoke GetDC,0
invoke CreateCompatibleDC,eax
pop ecx
mov [mapple],eax
invoke SelectObject,[mapple],ecx

and this code to draw the bitmap

invoke BitBlt,[mdc],[applex],[appley],20,20,[mapple],0,0,SRCCOPY 
A: 

This article shows (source code included) a couple of techniques to achieve that:

http://www.ucancode.net/faq/Draw_Transparent_bitmap.htm

karlphillip