OWLNext 7.0
Borland's Object Windows Library for the modern age
|
You can access TBrush through an HBRUSH or as a LOGBRUSH structure.
To get an HBRUSH from a TBrush object, use the HBRUSH() operator with the TBrush object as the parameter. The HBRUSH() operator, listed below, is almost never explicitly invoked:
This code automatically invokes the HBRUSH() conversion operator to cast the TBrush object to the correct type.
To convert a TBrush object to a LOGBRUSH structure, use the TBrush::GetObject function:
To reset the origin of a brush object, use the TBrush::UnrealizeObject function, which resets the brush's origin and returns a nonzero value if successful.
The following code shows how to use a brush to paint a rectangle in a window: