Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

CBrush Class

Encapsulates a Windows graphics device interface (GDI) brush.

class CBrush : public CGdiObject

Name

Description

CBrush::CBrush

Constructs a CBrush object.

Name

Description

CBrush::CreateBrushIndirect

Initializes a brush with the style, color, and pattern specified in a LOGBRUSH structure.

CBrush::CreateDIBPatternBrush

Initializes a brush with a pattern specified by a device-independent bitmap (DIB).

CBrush::CreateHatchBrush

Initializes a brush with the specified hatched pattern and color.

CBrush::CreatePatternBrush

Initializes a brush with a pattern specified by a bitmap.

CBrush::CreateSolidBrush

Initializes a brush with the specified solid color.

CBrush::CreateSysColorBrush

Creates a brush that is the default system color.

CBrush::FromHandle

Returns a pointer to a CBrush object when given a handle to a Windows HBRUSH object.

CBrush::GetLogBrush

Gets a LOGBRUSH structure.

Name

Description

CBrush::operator HBRUSH

Returns the Windows handle attached to the CBrush object.

To use a CBrush object, construct a CBrush object and pass it to any CDC member function that requires a brush.

Brushes can be solid, hatched, or patterned.

For more information on CBrush, see Graphic Objects.

Header: afxwin.h

Show:
© 2015 Microsoft