Share via


TransparentBlt

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This 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.

Syntax

BOOL TransparentBlt(
  HDC hdcDest,
  int nXOriginDest,
  int nYOriginDest,
  int nWidthDest,
  int hHeightDest,
  HDC hdcSrc,
  int nXOriginSrc,
  int nYOriginSrc,
  int nWidthSrc,
  int nHeightSrc,
  UINT crTransparent
);

Parameters

  • hdcDest
    [in] Handle to the destination device context.
  • nXOriginDest
    [in] Specifies the x-coordinate, in logical units, of the upper left corner of the destination rectangle.
  • nYOriginDest
    [in] Specifies the y-coordinate, in logical units, of the upper left corner of the destination rectangle.
  • nWidthDest
    [in] Specifies the width, in logical units, of the destination rectangle.
  • hHeightDest
    [in] Handle to the height, in logical units, of the destination rectangle.
  • hdcSrc
    [in] Handle to the source device context or a source bitmap handle.
  • nXOriginSrc
    [in] Specifies the x-coordinate, in logical units, of the source rectangle.
  • nYOriginSrc
    [in] Specifies the y-coordinate, in logical units, of the source rectangle.
  • nWidthSrc
    [in] Specifies the width, in logical units, of the source rectangle.
  • nHeightSrc
    [in] Specifies the height, in logical units, of the source rectangle.
  • crTransparent
    [in] Indicates that the RGB color in the source bitmap to treat as transparent.

Return Value

If the function succeeds, the return value is TRUE.

If the function fails, the return value is FALSE.

To get extended error information, call GetLastError.

Remarks

The TransparentBlt function is a wrapper for the TransparentImage function.

Requirements

Header windows.h
Library coredll.lib
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

TransparentImage
SetDIBitsToDevice
StretchDIBits
GDI Functions

Concepts

Creating Bitmaps