Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide to Clip-4-Win version 3.0 - <b>patblt()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
PatBlt()
Create/copy a bitmap pattern
------------------------------------------------------------------------------

Syntax
PatBlt( <hDC>, <nX>, <nY>, <nW>, <nH>, [ <nROP> ] )   -->   lSuccess

Arguments
<hDC> is a handle to a device context.

<nX>, <nY> are used to specify the position of the top left-
hand corner of the bitmap in pixels.

<nW>, <nH> specify the width and height of the bitmap.

<nROP> optionally specifies the raster operation to use
(default PATCOPY).

Returns
If successful, logical TRUE (.T.) is returned, otherwise FALSE
(.F.) is returned.

Description
This function can be used to create/copy patterned bitmaps.
Full details of how and when to use it are beyond the scope of
this manual.

Example
// Fill an area using a bitmap brush
hDC = GetDC( hWnd )
     . . .
hBmp = LoadBitmap( , ID_MYBITMAP )
hBmpBrush = CreatePatternBrush( hBmp )
UnrealizeObject( hBmpBrush )
hOldBrush = SelectObject( hDC, hBmpBrush )
PatBlt( hDC, 50, 50, 100, 100 )
SelectObject( hDC, hOldBrush )
DeleteObject( hBmpBrush )
     . . .
ReleaseDC( hWnd, hDC )

See Also: BitBlt() LoadBitmap() UnrealizeObject()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson