[This is preliminary documentation and subject to change.]
The TransparentBlt function performs a bit-block transfer of the color data corresponding to a rectangle of pixels from the specified source device context into a destination device context.
BOOL TransparentBlt(
HDC hdcDest,
int nXOriginDest,
int nYOriginDest,
int nWidthDest,
int hHeightDest,
HDC hdcSrc,
int nXOriginSrc,
int nYOriginSrc,
int nWidthSrc,
int nHeightSrc,
UINT crTransparent
);
If the function succeeds, the return value is TRUE.
If the function fails, the return value is FALSE.
Windows NT: To get extended error information, call GetLastError.
The TransparentBlt function is supported for source bitmaps of 4 bits per pixel and 8 bits per pixel. Use AlphaBlend to specify 32-bit per pixel bitmaps with transparency.
If the source and destination rectangles are not the same size, the source bitmap is stretched to match the destination rectangle. When the SetStretchBltMode function is used, the iStretchMode modes of BLACKONWHITE and WHITEONBLACK are converted to COLORONCOLOR for the TransparentBlt function.
The destination device context specifies the transformation type for the destination coordinates. The source device context specifies the transformation type for the source coordinates.
TransparentBlt does not mirror a bitmap if either the width or height, of either the source or destination, is negative.
Windows NT: Requires version 5.0 or later.
Windows: Requires Windows 98 or later.
Windows CE: Unsupported.
Header: Declared in wingdi.h.
Import Library: Included as a resource in msimg32.dll.
Bitmaps Overview, Bitmap Functions, AlphaBlend, SetStretchBltMode