Transparent Bitmap?
-
Hi, I'm trying to add bitmaps to the menu in my vc++6 app. The problem is that my bitmaps have a purple background and this is displayed in the menu. How do i load a bitmap and set a color to transparency? cheers Asim Hussain e: asim@jawache.net w: www.jawache.net
-
Hi, I'm trying to add bitmaps to the menu in my vc++6 app. The problem is that my bitmaps have a purple background and this is displayed in the menu. How do i load a bitmap and set a color to transparency? cheers Asim Hussain e: asim@jawache.net w: www.jawache.net
You need to do a transparent blit into a bitmap-dc. W2K and up have a API-fkt doing this. Older Windows have to emulate that via several blits using a sequence of ROPs. I found such a routine on codeguru*duck under the knife thrown*. Alternatively, the function
AfxLoadSysColorBitmap()
might do what you want. It is inafxext.h
.