Hide

SftTabs/DLL 6.5 - Tab Control

Display
Print

PaintBitmap

Paints a bitmap.

C

void WINAPI SftTabs_PaintBitmap(HDC hDC, LPRECT lpRect, BOOL fStretch, HBITMAP hBitmap, COLORREF BgColor);

Parameters

hDC

The device context used to draw the bitmap.

lpRect

The area where the bitmap is painted, expressed in coordinates suitable for the device context hDC.

fStretch

Set to TRUE to fill the area described by lpRect with the bitmap by stretching the bitmap. Otherwise set to FALSE to center the bitmap in the area provided.

hBitmap

A bitmap handle describing the bitmap to be painted.

BgColor

The background color used by the area surrounding the bitmap. The top, left pixel of the bitmap is examined and determines the bitmap's background color. The bitmap is painted after all pixels which have the bitmap's background color are replaced by the color BgColor. This allows the background of a window to seamlessly "flow" into the background of the bitmap. An RGB value or a GetSysColor index value can be specified for this color value. If a color index is used, the high-order bit must be set (e.g., COLOR_WINDOW | 0x80000000L).

Returns

The return value is TRUE if the bitmap could be painted, otherwise FALSE is returned.

Comments

The PaintBitmap function paints a bitmap.

This function is provided to easily paint a bitmap on a dialog or window as is typically the case with Wizard-style dialogs.

SftTabs_PaintTiledBitmap can be used to fill an area with a bitmap, which is automatically tiled.

See Also C/C++ API | C++ Classes | Notifications


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.