1.6.9 Painting Rectangular Areas

The FillRect, FrameRect, and InvertRect functions provide an easy way to carry out painting operations on rectangles in the client area.

The FillRect function fills a rectangle with the color and pattern of a given brush. This function fills all parts of the rectangle, including the edges or borders.

The FrameRect function uses a brush to draw a border around a rectangle. The border width and height is one unit.

The InvertRect function inverts the contents of the given rectangle. On monochrome displays, white pixels become black, and vice versa. On color displays, the

results depend on the method used by the display to generate color. In either case, calling InvertRect twice with the same rectangle restores the screen to its original colors.