다음을 통해 공유


CDC::FrameRect

Draws a border around the rectangle specified by lpRect.

void FrameRect( 
   LPCRECT lpRect, 
   CBrush* pBrush  
);

Parameters

  • lpRect
    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.

  • pBrush
    Identifies the brush to be used for framing the rectangle.

Remarks

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.

Requirements

Header: afxwin.h

See Also

Reference

CDC Class

Hierarchy Chart

CBrush Class

FrameRect

CDC::Rectangle

CDC::FrameRgn

RECT Structure