CDC::FillRect

Syntax

void FillRect( LPRECT lpRect, CBrush* pBrush );

Parameters

lpRect

Points to a RECT or CRect that contains the logical coordinates of the rectangle to be filled. You can also pass a CRect object for this parameter.

pBrush

Identifies the brush used to fill the rectangle.

Remarks

Fills a given rectangle by using the specified brush. The function fills the complete rectangle, including the left and top borders, but does not fill the right and bottom borders.

When filling the specified rectangle, FillRect does not include the rectangle's right and bottom sides. GDI fills a rectangle up to, but does not include, the right column and bottom row, regardless of the current mapping mode. FillRect compares the values of the top, bottom, left, and right members of the specified rectangle. If bottom is less than or equal to top, or if right is less than or equal to left, the rectangle is not drawn.

See Also

CBrush, ::FillRect