I've run into a problem with the TransparentBlt function.
When I use TransparentBlt with a 24-bit bitmap it correctly masks the
specified transparent color, but when I call it for a 4-bit or 8-bit
bitmap, it doesn't make that color transparent.
For example, if I have a bitmap with a large rectangle of MAGENTA
color and give RGB(255,0,255) as the last parameter in the function,
the magenta is still there with a 4-bit bitmap, but it's masked with
the 32-bit one.
This problem might be because 256-color/16-color bitmaps don't use RGB
values. May be they use palettes somehow.
Can anyone help with that?
I had also posted this question at the codeproject.com forum (
http://www.codeproject.com/Forums/1647/C-Cplusplus-MFC.aspx?fid=1647&select=3291549&tid=3291549
), but the replies there were mostly I should use a 24/32 bit bitmap.
For various reasons though, I have to support also 4bpp and 8bpp
bitmaps.