OWLNext 7.0
Borland's Object Windows Library for the modern age
|
You can construct a TBrush either directly, by specifying the color, width, and style of the brush, or indirectly, by specifying a TBrush & or a pointer to a LOGBRUSH structure.
Directly constructing a brush creates a new object with the specified attributes. Here are the constructors for directly constructing a brush:
The first constructor creates a solid brush with the color contained in color.
The second constructor creates a hatched brush with the color contained in color and the hatch style contained in style. style can be one of the following values:
The third and fourth constructors create a brush from the bitmap or DIB passed as a parameter. The width of the brush depends on the size of the bitmap or DIB.
Indirectly creating a brush also creates a new object, but copies the attributes of the object passed to it into the new brush object. Here are the constructors for indirectly creating a brush:
You can also create a new TBrush object from an existing HBRUSH handle:
This constructor is used to obtain an ObjectWindows object as an alias to a regular Windows handle received in a message.