CDC::TransparentBlt
Call this member function to transfer a bit-block of the color data, which corresponds to a rectangle of pixels from the specified source device context, into a destination device context.
BOOL TransparentBlt(
int xDest,
int yDest,
int nDestWidth,
int nDestHeight,
CDC* pSrcDC,
int xSrc,
int ySrc,
int nSrcWidth,
int nSrcHeight,
UINT clrTransparent
);
Parameters
xDest
Specifies the x-coordinate, in logical units, of the upper-left corner of the destination rectangle.yDest
Specifies the y-coordinate, in logical units, of the upper-left corner of the destination rectangle.nDestWidth
Specifies the width, in logical units, of the destination rectangle.nDestHeight
Specifies the height, in logical units, of the destination rectangle.pSrcDC
Pointer to the source device context.xSrc
Specifies the x-coordinate, in logical units, of the source rectangle.ySrc
Specifies the y-coordinate, in logical units, of the source rectangle.nSrcWidth
Specifies the width, in logical units, of the source rectangle.nSrcHeight
Specifies the height, in logical units, of the source rectangle.clrTransparent
The RGB color in the source bitmap to treat as transparent.
Return Value
TRUE if successful; otherwise FALSE.
Remarks
TransparentBlt allows for transparency; that is, the RGB color indicated by clrTransparent is rendered transparent for the transfer.
For more information, see TransparentBlt in the Windows SDK.
Requirements
Header: afxwin.h