The FrameRect function draws a border around the specified rectangle by using the specified brush. The width and height of the border are always one logical unit.
int FrameRect(
HDC hDC, // handle to device context
CONST RECT *lprc, // pointer to rectangle coordinates
HBRUSH hbr // handle to brush
);
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.
Windows NT: To get extended error information, call GetLastError.
The brush identified by the hbr parameter must have been created by using the CreateHatchBrush, CreatePatternBrush, or CreateSolidBrush function, or retrieved by using the GetStockObject function.
If the bottom member of the RECT structure is less than or equal to the top member, or if the right member is less than or equal to the left member, the function does not draw the rectangle.
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in winuser.h.
Import Library: Use user32.lib.
Filled Shapes Overview, Filled Shape Functions, CreateHatchBrush, CreatePatternBrush, CreateSolidBrush, GetStockObject, RECT