Is there a way to set a color on a bitmap to transparent without doing a BitBlt mask in WM_PAINT everytime, can you just bitblt it onto the dc transparent?
Posted on 2000-11-30 01:08:00 by plu
wm_paint...hmmm in GDI...no way you must make a mask if its a game...or (harder) manage to modify individual pixels in bitmap selected in a DC or better: =========== make a memory array, make pixel operations in it then transfer pixels in it to a bitmap, select bitmap to a memory DC an again blit that bitmap to screen DC on wm_paint....like a backbuffer in DirectX...
Posted on 2000-11-30 22:08:00 by BogdanOntanu
While I forget it's name, if you confine yourself to Win98 and up, MS actually added a transparent blit api function. Nope, no example code either. And I never tried it. Gee, not much help at all, am I? ;-)
Posted on 2000-11-30 23:28:00 by TTom
In Win 98 and 2000 there is API called AlphaBlend for blitting transparent bitmaps.
Posted on 2000-12-01 15:27:00 by Sami
TTom, it's TransparentBlt. don't you hate it when you're that close?
Posted on 2000-12-01 17:40:00 by Sloat
how do i use TransparentBlt?
Posted on 2000-12-16 10:28:00 by guybrush
Look on microsoft.com and type TransparentBlt in the little search box then press go, there are 3 Bitmap funtions that are new to the win98 os
Posted on 2000-12-16 19:28:00 by dork
Another thing just occured to me. There's a trechnique to get the GDI stuff to make the mask for you, works any version (even Windows 3) Basically, you create a 2 color (B&W) DC, and set the backcolor to the desired 'transparent' color. Then load the desired bitmap there. What you get is a bitmap mounted in the DC, with the 'transparent' color rendered as black, and any other colors rendered as white. This automatically makes the mask bitmap for you.
Posted on 2000-12-16 19:57:00 by TTom
Assembling: transtest.asm revealer.asm(164) : error A2006: undefined symbol : TransparentBlt how do i fix this?
Posted on 2000-12-17 09:49:00 by guybrush
nevermind i already got it, you just have to add: includelib MSIMG32.LIB and include MSIMG32.inc
Posted on 2000-12-17 09:54:00 by guybrush