WFC Brush Object

The capabilities of Win32 brushes are encapsulated in the WFC Brush and BrushStyle objects, objects that you coordinate to create solid, pattern, and hatched brushes.

The Brush object defines a group of public final members, each of which is a Brush object representing a solid brush. The BrushStyle class represents hatched brushes as a group of integer constants, each of which represents a different brush style.

The following table lists the Brush object constants that represent solid brushes.

Constant Description
Brush.ACTIVEBORDER Represents a Brush object the color of the active window border.
Brush.ACTIVECAPTION Represents a Brush object the color of the active caption bar.
Brush.APPWORKSPACE Represents a Brush object that is the color of the application workspace window.
Brush.CONTROL Represents a Brush object that is the color of controls.
Brush.CONTROLDARK Represents a Brush object that is the color of the shadow portion of a 3D element.
Brush.CONTROLDARKDARK Represents a Brush object that is the color of the darkest portion of a 3D element.
Brush.CONTROLLIGHT Represents a Brush object that is the color of the highlighted portion of a 3D element.
Brush.CONTROLLIGHTLIGHT Represents a Brush object that is the color of the lightest part of a 3D element.
Brush.DESKTOP Represents a Brush object that is the current color of the desktop.
Brush.HALFTONE Represents a Brush object that is the color of a standard halftone brush.
Brush.HIGHLIGHT Represents a Brush object that is the color of the background of highlighted elements.
Brush.HOLLOW Represents a null brush, which paints nothing.
Brush.HOTTRACK Represents a Brush object that is the color used to indicate hot tracking.
Brush.INACTIVEBORDER Represents a Brush object that is the color of an inactive window border.
Brush.INACTIVECAPTION Represents a Brush object that is the color of an inactive caption bar.
Brush.INFO Represents a Brush object that is the color of the background of an information ToolTip.
Brush.MENU Represents a Brush object that is the color of the menu background.
Brush.NULL Represents a null brush.
Brush.SCROLLBAR Represents a Brush object that is the color of a scrollbar background.
Brush.WINDOW Represents a Brush object that is the color of the window background.

The following table lists the BrushStyle constants that represent hatched brushes.

Constant Description
BrushStyle.BACKWARDDIAGONAL Represents a backward diagonal brush. Parallel lines run from the lower-left corner of the brush origin to the upper-right corner.
BrushStyle.DIAGONALCROSS Represents a cross-hatched brush.
BrushStyle.FORWARDDIAGONAL Represents a forward diagonal brush. Parallel lines run from the lower-right corner of the brush origin to the upper-left corner.
BrushStyle.HOLLOW Represents a hollow brush. A hollow brush is identical to a null brush.
BrushStyle. HORIZONTAL Represents pattern consisting of evenly spaced horizontal lines.
BrushStyle.PATTERN Represents a pattern brush.
BrushStyle.SOLID Represents a solid brush.
BrushStyle.VERTICAL Represents pattern consisting of evenly spaced vertical lines.