typedef struct tagLBRUSH {
short lbStyle;
long lbColor;
short lbHatch;
long lbBkColor;
} LBRUSH;
The LBRUSH structure contains style and color information for a brush.
lbStyle
Specifies brush style. GDI requires that drivers support at least the following brush styles.
Value | Meaning |
BS_SOLID (0) | Brush is a single solid or dithered color. |
BS_HOLLOW (1) | Brush has no color or pattern. |
BS_HATCHED (2) | Brush has a predefined pattern. |
BS_PATTERN (3) | Brush has the pattern as specified by a given bitmap. |
lbColor
Specifies a foreground color for brushes having BS_SOLID and BS_HATCHED values. For BS_HOLLOW and BS_PATTERN values, this member is zero. Brush colors are specified as physical colors. For palette-capable devices, this member specifies a physical-color index if the high-order byte is 0xFF.
lbHatch
Specifies a brush pattern for brushes having BS_HATCHED style or a global memory handle for a bitmap for brushes having BS_PATTERN style. For BS_SOLID and BS_HOLLOW values, this member is zero.
For BS_HATCHED brushes, this member specifies a brush pattern and can be one of the following values.
Value | Description |
HS_HORIZONTAL | Horizontal hatch |
HS_VERTICAL | Vertical hatch |
HS_FDIAGONAL | 45-degree upward hatch (left to right) |
HS_BDIAGONAL | 45-degree downward hatch (left to right) |
HS_CROSS | Horizontal and vertical cross hatch |
HS_DIAGCROSS | 45-degree cross hatch |
For BS_PATTERN style, this member is the global memory handle to a PBITMAP structure specifying the pattern.
lbBkColor
Specifies the background color for brushes having BS_HATCHED style. Brush colors are specified as physical colors. For palette-capable devices, this member specifies a physical color index if the high-order byte is 0xFF.