Microsoft Windows CE 3.0  

LOGBRUSH

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This structure defines the style, color, and pattern of a logical brush.  

typedef
struct
tagLOGBRUSH
{
UINT
lbStyle
;
COLORREF
lbColor
;
LONG
lbHatch
;
}
LOGBRUSH;

Members

lbStyle
Specifies the brush style. It is one of the following styles.
Value Description
BS_DIBPATTERN A pattern brush defined by a device-independent bitmap (DIB) specification. If lbStyleis BS_DIBPATTERN, the lbHatchmember contains a handle to a packed DIB.
BS_DIBPATTERN8X8 Same as BS_DIBPATTERN.
BS_DIBPATTERNPT A pattern brush defined by a device-independent bitmap (DIB) specification. If lbStyleis BS_DIBPATTERNPT, the lbHatchmember contains a pointer to a packed DIB.
BS_HATCHED Hatched brush.
BS_HOLLOW Hollow brush.
BS_NULL Same as BS_HOLLOW.
BS_PATTERN Pattern brush defined by a memory bitmap.
BS_PATTERN8X8 Same as BS_PATTERN.
BS_SOLID Solid brush.
lbColor
Specifies the color in which the brush is to be drawn. If lbStyleis the BS_HOLLOW or BS_PATTERN style, lbColoris ignored.

If lbStyleis BS_DIBPATTERN or BS_DIBPATTERNBT, the low-order word of lbColorspecifies whether the bmiColorsmembers of the BITMAPINFOstructure contain explicit red, green, blue (RGB) values or indices into the currently realized logical palette. The lbColormember must be one of the following values.

Value Description
DIB_PAL_COLORS The color table consists of an array of 16-bit indices into the currently realized logical palette.
DIB_RGB_COLORS The color table contains literal RGB values.
lbHatch
Specifies a hatch style. The meaning depends on the brush style defined by lbStyle.

If lbStyleis BS_DIBPATTERN, the lbHatchmember contains a handle to a packed DIB. If lbStyleis BS_DIBPATTERNPT, the lbHatchmember contains a pointer to a packed DIB.

If lbStyleis BS_HATCHED, the lbHatchmember specifies the orientation of the lines used to create the hatch. It can be one of the following values.

Value Description
HS_BDIAGONAL A 45-degree upward, left-to-right hatch
HS_CROSS Horizontal and vertical cross-hatch
HS_DIAGCROSS 45-degree crosshatch
HS_FDIAGONAL A 45-degree downward, left-to-right hatch
HS_HORIZONTAL Horizontal hatch
HS_VERTICAL Vertical hatch

If lbStyleis BS_PATTERN, lbHatchis a handle to the bitmap that defines the pattern. The bitmap cannot be a DIB section bitmap, which is created by the CreateDIBSectionfunction.

If lbStyleis BS_SOLID or BS_HOLLOW, lbHatchis ignored.

Remarks

Windows CE versions 1.0 and 1.01 support only the following lbStylevalues:

  • BS_NULL
  • BS_SOLID

    Windows CE versions 2.0 and later support the following additional lbStylevalues:

    • BS_DIBPATTERNPT
    • BS_PATTERN

      Although lbColorcontrols the foreground color of a hatch brush, the SetBkModeand SetBkColorfunctions control the background color.

      Requirements

      Runs on Versions Defined in Include Link to
      Windows CE OS 2.0 and later Wingdi.h    
      Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

      See Also

      BITMAPINFO, CreateDIBSection, SetBkColor, SetBkMode