I'm not experienced on
C++ builder, however transparency features are usually implemented basing on the underlying
OS support.
Microsoft Windows could handle transparency in two ways:
- thru GDI, by setting a specific RGB color as transparent. This way each pixel of the given color is treated as completely transparent and other pixels will be completely opaque
- thru GDI+, by using images with a valid alpha channel. This ways each pixel has 4 bytes associated with it: the red, green, blue and alpha values. The alpha value of each pixel determine how that pixel is opaque: a value of 0 mean that the pixel is completely transparent and a value of 255 means that the pixel is completely opaque
Said that, you can use
GDI+ to render a semi-transparent image, and if you want to use a
gray-scale bitmap as transparency mask, you should first load your image on a
GDI+ context, then modify each pixel to set their
alpha value to the value of the correspondant pixel from the
gray-scale bitmap.