Table of Contents

Method BitBlt

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

BitBlt(nint, int, int, int, int, nint, int, int, int)

Performs a bit-block transfer of color data from a source device context to a destination device context.

public static extern int BitBlt(nint hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, nint hdcSrc, int nXSrc, int nYSrc, int rop)

Parameters

hdcDest nint

A handle to the destination device context.

nXDest int

The x-coordinate, in logical units, of the upper-left corner of the destination rectangle.

nYDest int

The y-coordinate, in logical units, of the upper-left corner of the destination rectangle.

nWidth int

The width, in logical units, of the rectangle to be transferred.

nHeight int

The height, in logical units, of the rectangle to be transferred.

hdcSrc nint

A handle to the source device context.

nXSrc int

The x-coordinate, in logical units, of the upper-left corner of the source rectangle.

nYSrc int

The y-coordinate, in logical units, of the upper-left corner of the source rectangle.

rop int

The raster-operation code that specifies how the source and destination data are combined. For a list of common raster-operation codes, see the Windows GDI documentation.

Returns

int

If the operation succeeds, the return value is a nonzero value. If the operation fails, the return value is zero, and extended error information can be retrieved by calling GetLastWin32Error().

Remarks

The BitBlt function is a low-level GDI operation used for copying pixel data between device contexts. It is commonly used for rendering graphics or performing screen captures.