int FrameRect(hdc, lprc, hbr) | |||||
HDC hdc; | /* handle of device context | */ | |||
CONST RECT *lprc; | /* address of structure with rectangle | */ | |||
HBRUSH hbr; | /* handle of brush | */ |
The FrameRect function draws a border around a rectangle, using the specified brush. The width and height of the border are always one logical unit.
hdc
Identifies the device context in which to draw the border.
lprc
Points to a RECT structure that contains the logical coordinates of the upper-left and lower-right corners of the rectangle. The RECT structure has the following form:
typedef struct tagRECT { /* rc */
LONG left;
LONG top;
LONG right;
LONG bottom;
} RECT;
hbr
Identifies the brush that will be used to draw the border.
The return value is TRUE if the function was successful, or FALSE if an error occurred. Use the GetLastError function to obtain extended error information.
The brush identified by the hbr parameter must have been created previously by using the CreateHatchBrush, CreatePatternBrush, or CreateSolidBrush function.
If the bottom member is less than or equal to the top member, or if the right member is less than or equal to the left member, the rectangle is not drawn.
CreateHatchBrush, CreatePatternBrush, CreateSolidBrush