CBrush::CreateDIBPatternBrush

This member function initializes a brush with the pattern specified by a device-independent bitmap (DIB). The brush can subsequently be selected for any device context that supports raster operations.

Syntax

BOOL CreateDIBPatternBrush ( HGLOBAL hPackedDIB, UINT nUsage );

BOOL CreateDIBPatternBrush( const void* lpPackedDIB, UINT nUsage );

At a Glance

Header File Afxwin.h
Platforms
Versions 1.0 and later
Complete documentation Visual C++ documentation

Remarks

Windows CE 1.0 doesn't support the DIB_PAL_COLORS flag in the nUsage parameter.

See Also

CBrush Overview, CBrush Member Functions, Graphical Drawing Object Classes, CBrush::CreateBrushIndirect, CBrush::CreateSolidBrush, CGdiObject::CreateStockObject, CDC::SelectObject, CGdiObject::DeleteObject, CDC::GetBrushOrg, CDC::SetBrushOrg

CBrush::CreatePatternBrush

This member function initializes a brush with a pattern specified by a bitmap. The brush can subsequently be selected for any device context that supports raster operations.

Syntax

BOOL CreatePatternBrush( CBitmap* pBitmap );

At a Glance

Header file: Afxwin.h
Platforms:
Versions: 3.0 and later
Complete documentation: Visual C++ documentation

See Also

CBrush Overview, CBrush Member Functions, Graphical Drawing Object Classes, CBrush::CreateBrushIndirect, CBrush::CreateDIBPatternBrush, CGdiObject::DeleteObject