Export (0) Print
Expand All
Expand Minimize

PatBlt (Windows CE 5.0)

Windows CE 5.0
Send Feedback

This function paints the given rectangle using the brush that is currently selected into the specified device context. The brush pixels and the surface pixels are combined according to the specified raster operation.

BOOL PatBlt(
  HDC hdc, 
  int nXLeft, 
  int nYLeft, 
  int nWidth, 
  int nHeight, 
  DWORD dwRop
); 

Parameters

hdc
[in] Handle to the device context.
nXLeft
[in] Specifies the x-coordinate, in logical units, of the upper-left corner of the rectangle to be filled.
nYLeft
[in] Specifies the y-coordinate, in logical units, of the upper-left corner of the rectangle to be filled.
nWidth
[in] Specifies the width, in logical units, of the rectangle.
nHeight
Specifies the height, in logical units, of the rectangle.
dwRop
[in] Specifies the raster operation code.

This code may be one of the following values.

ValueDescription
PATCOPYCopies the specified pattern into the destination bitmap.
PATINVERTCombines the colors of the specified pattern with the colors of the destination rectangle by using the Boolean OR operator.
DSTINVERTInverts the destination rectangle.
BLACKNESSFills the destination rectangle using the color associated with index 0 in the physical palette.

This color is black for the default physical palette.

WHITENESSFills the destination rectangle using the color associated with index 1 in the physical palette.

This color is white for the default physical palette.

For the complete list of raster operations codes, see Ternary Raster Operations.

Return Values

Nonzero indicates success.

Zero indicates failure.

To get extended error information, call GetLastError.

Remarks

The values of the dwRop parameter for this function are a limited subset of the full 256 ternary raster-operation codes; in particular, an operation code that refers to a source rectangle cannot be used.

Not all devices support the PatBlt function.

For more information, see the description of the RC_BITBLT capability in the GetDeviceCaps function.

If hdc specifies a mirrored device context, the horizontal coordinates increase from right to left rather than from left to right.

For information about blitting to displays with right-to-left orientations, see Creating Bitmaps.

Requirements

OS Versions: Windows CE 1.0 and later.
Header: Windows.h.
Link Library: Coredll.lib.

See Also

BitBlt | GetDeviceCaps | GDI Functions | Ternary Raster Operations


Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.


Show:
© 2015 Microsoft