PatBlt function (wingdi.h)
The PatBlt function paints the specified rectangle using the brush that is currently selected into the specified device context. The brush color and the surface color or colors are combined by using the specified raster operation.
BOOL PatBlt(
[in] HDC hdc,
[in] int x,
[in] int y,
[in] int w,
[in] int h,
[in] DWORD rop
);
[in] hdc
A handle to the device context.
[in] x
The x-coordinate, in logical units, of the upper-left corner of the rectangle to be filled.
[in] y
The y-coordinate, in logical units, of the upper-left corner of the rectangle to be filled.
[in] w
The width, in logical units, of the rectangle.
[in] h
The height, in logical units, of the rectangle.
[in] rop
The raster operation code. This code can be one of the following values.
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.
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.
For an example, see "Example of Menu-Item Bitmaps" in Using Menus.
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | wingdi.h (include Windows.h) |
Library | Gdi32.lib |
DLL | Gdi32.dll |