Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

Bitmap Transparency

SftTree/DLL automatically uses bitmap transparency for all bitmaps used throughout a tree control. When a bitmap is displayed, the background can show through portions of the bitmap. SftTree/DLL accomplishes this by dynamically modifying a copy of the bitmap to adjust for the background color.

The top, left pixel of each bitmap is inspected as the bitmap is painted. The color of that pixel represents the bitmap's background color. This color is replaced throughout the bitmap with the actual background color.

If the bitmap image includes the top, left pixel, add an extra row or column of pixels to the bitmap, so the image does not include the top, left pixel.

Bitmap transparency is only used for bitmaps and is not used for icons, images in an ImageList control or other images that can be represented by a SFT_PICTURE structure.

Bitmap transparency for bitmaps is fully automatic and cannot be turned off.