int FrameRect(hDC,lpRect,hBrush)
This function draws a border around the rectangle specified by the lpRect parameter. The FrameRect function uses the given brush to draw the border. The width and height of the border is always one logical unit.
Parameter | Type/Description |
hDC | HDC Identifies the device context of the window. | |
lpRect | LPRECT Points to a RECT data structure that contains the logical coordinates of the upper-left and lower-right corners of the rectangle. | |
hBrush | HBRUSH Identifies the brush to be used for framing the rectangle. |
Although the return value type is integer, its contents should be ignored.
The brush identified by the hBrush parameter must have been created previously by using the CreateHatchBrush, CreatePatternBrush, or CreateSolidBrush function.
If the bottom field is less than or equal to the top field, or if right is less than or equal to left, the rectangle is not drawn.