This function transfers a bitmap, omitting the portions drawn in a specified color.
At a Glance
Header file: | Wingdi.h |
Windows CE versions: | 2.0 and later |
Syntax
BOOL TransparentImage(HDC hdcDest, LONG DstX, LONG DstY,
LONG DstCx, LONG DstCy, HANDLE hSrc, LONG SrcX, LONG SrcY,
LONG SrcCx, LONG SrcCy, COLORREF TransparentColor );
Parameters
hdcDest
[in] Handle to a device context.
DstX
[in] Specifies the x-coordinate, in logical units, of the upper-left corner of the destination rectangle.
DstY
[in] Specifies the y-coordinate, in logical units, of the upper-left corner of the destination rectangle.
DstCx
[in] Specifies the width, in logical units, of the destination rectangle.
DistCy
[in] Specifies the height, in logical units, of the destination rectangle.
hSrc
[in] Specifies a source device context or a source bitmap.
SrcX
[in] Specifies the x-coordinate, in logical units, of the upper-left corner of the source rectangle.
SrcY
[in] Specifies the y-coordinate, in logical units, of the upper-left corner of the source rectangle.
SrcCx
[in] Specifies the width, in logical units, of the source rectangle.
SrcCy
[in] Specifies the height, in logical units, of the source rectangle.
TransparentColor
[in] Indicates the color in the bitmap that will be rendered transparent.
Return Values
Nonzero indicates success. Zero indicates failure. To get extended error information, call GetLastError.
Remarks
If the hSrc parameter is a HBITMAP, then that bitmap must not be selected into a device context at the time TransparentImage is called.
See Also