This documentation is archived and is not being maintained.


Draws a border around the rectangle specified by lpRect.

void FrameRect( 
   LPCRECT lpRect, 
   CBrush* pBrush  


Points to a RECT structure or CRect object that contains the logical coordinates of the upper-left and lower-right corners of the rectangle. You can also pass a CRect object for this parameter.


Identifies the brush to be used for framing the rectangle.

The function uses the given brush to draw the border. The width and height of the border is always 1 logical unit.

If the rectangle's bottom coordinate is less than or equal to top, or if right is less than or equal to left, the rectangle is not drawn.

The border drawn by FrameRect is in the same position as a border drawn by the Rectangle member function using the same coordinates (if Rectangle uses a pen that is 1 logical unit wide). The interior of the rectangle is not filled by FrameRect.

Header: afxwin.h