The LOGBRUSH structure has the following form:
typedef struct tag LOGBRUSH { /* lb */
UINT lbStyle;
COLORREF lbColor;
LONG lbHatch;
} LOGBRUSH;
The LOGBRUSH structure defines the style, color, and pattern of a physical brush. It is used by the Windows CreateBrushIndirect and ExtCreatePen functions.
Members
lbStyle
Specifies the brush style. The lbStyle member must be one of the following styles:
lbColor
Specifies the color in which the brush is to be drawn. If lbStyle is the BS_HOLLOW or BS_PATTERN style, lbColor is ignored. If lbStyle is BS_DIBPATTERN or BS_DIBPATTERNBT, the low-order word of lbColor specifies whether the bmiColors members of the BITMAPINFO structure contain explicit red, green, blue (RGB) values or indices into the currently realized logical palette. The lbColor member must be one of the following values:
lbHatch
Specifies a hatch style. The meaning depends on the brush style defined by lbStyle. If lbStyle is BS_DIBPATTERN, the lbHatch member contains a handle to a packed DIB. If lbStyle is BS_DIBPATTERNPT, the lbHatch member contains a pointer to a packed DIB. If lbStyle is BS_HATCHED, the lbHatch member specifies the orientation of the lines used to create the hatch. It can be one of the following values:
If lbStyle is BS_PATTERN, lbHatch is a handle to the bitmap that defines the pattern. If lbStyle is BS_SOLID or BS_HOLLOW, lbHatch is ignored.
Comments
Although lbColor controls the foreground color of a hatch brush, the CDC::SetBkMode and CDC::SetBkColor functions control the background color.
See Also CDC::GetCharABCWidths