Function:
BitBlt(hdcDest, nXDest, nYDest, nWidth, nHeight, hdcSrc, nXSrc, nYSrc, dwRop)

 

Description:
Performs a bit-block transfer of the colour data corresponding to a rectangle of pixels from the specified source device context into a destination device context.

 

Parameters:
hdcDest: handle to destination device context.
nXDest: x-coordinate of destination rectangle’s upper-left corner.
nYDest: y-coordinate of destination rectangle’s upper-left corner.
nWidth: width of destination rectangle.
nHeight: height of destination rectangle.
hdcSrc: handle to source device context.
nXSrc: x-coordinate of source rectangle’s upper-left corner.
nYSrc: y-coordinate of source rectangle’s upper-left corner.
dwRop: raster operation flag (value can be any of the following).
BLACKNESS = 66
Fill the destination rectangle with the colour whose index is 0 in
the physical palette (black by default).
DSTINVERT = 5570569
Invert the colours in the destination rectangle.
MERGECOPY = 12583114
Merge the colours of the source rectangle with the specified pattern
using the bitwise AND operator.
MERGEPAINT = 12255782
Merge the colours of the inverted source rectangle with the colours of
the destination rectangle using the bitwise OR operator.
NOTSRCCOPY = 3342344
Copy the inverted source rectangle to the destination rectangle.
NOTSRCERASE = 1114278
Combine the colours of the source and destination rectangles using the
bitwise OR operator and then invert the resulting colour.
PATCOPY = 15728673
Copy the specified pattern into the destination bitmap.
PATINVERT = 5898313
Combine the colours of the specified pattern with the colours of the
destination rectangle using the bitwise XOR operator.
PATPAINT = 16452105
Combine the colours of the specified pattern with the colours of the
inverted source rectangle using the bitwise OR operator. Combine the
result of that operation with the colours of the destination rectangle
using the bitwise OR operator.
SRCAND = 8913094
Combine the colours of the source and destination rectangles using the
bitwise AND operator.
SRCCOPY = 13369376
Copy the source rectangle directly into the destination rectangle.
SRCERASE = 4457256
Combine the inverted colours of the destination rectangle with the colours
of the source rectange using the bitwise AND operator.
SRCINVERT = 6684742
Combine the colours of the source and destination rectangles using the
bitwise XOR operator.
SRCPAINT = 15597702
Combine the colours of the source and destination rectangles using the
bitwise OR operator.
WHITENESS = 16711778
Fill the destination rectangle with the colour whose index is 1 in the
physical palette (white by default).

 

Returns:
If an error occured, the function returns 0. If successful, the function returns a non-zero value.

 

Example:
Click on the calc icon to view a sample of the BitBlt function.