CBrush::CreateHatchBrush

Syntax

BOOL CreateHatchBrush( int nIndex, DWORD crColor );

Parameters

nIndex

Specifies the hatch style of the brush. It can be one of the following values:

Value Meaning

HS_BDIAGONAL Downward hatch (left to right) at 45 degrees
HS_CROSS Horizontal and vertical crosshatch
HS_DIAGCROSS Crosshatch at 45 degrees
HS_FDIAGONAL Upward hatch (left to right) at 45 degrees
HS_HORIZONTAL Horizontal hatch
HS_VERTICAL Vertical hatch

crColor

Specifies the foreground color of the brush as an RGB color (the color of the hatches).

Remarks

Initializes a brush with the specified hatched pattern and color. The brush can subsequently be selected as the current brush for any device context.

Return Value

TRUE if successful; otherwise FALSE.

See Also

CBrush::CreateBrushIndirect, CBrush::CreateDIBPatternBrush, CBrush::CreatePatternBrush, CBrush::CreateSolidBrush, CGdiObject::CreateStockObject, ::CreateHatchBrush