Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

FrameRect function

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.

Syntax


int FrameRect(
  _In_  HDC hDC,
  _In_  const RECT *lprc,
  _In_  HBRUSH hbr
);

Parameters

hDC [in]

A handle to the device context in which the border is drawn.

lprc [in]

A pointer to a RECT structure that contains the logical coordinates of the upper-left and lower-right corners of the rectangle.

hbr [in]

A handle to the brush used to draw the border.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero.

Remarks

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 the top member, or if the right member is less than the left member, the function does not draw the rectangle.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winuser.h (include Windows.h)

Library

User32.lib

DLL

User32.dll

See also

Filled Shapes Overview
Filled Shape Functions
CreateHatchBrush
CreatePatternBrush
CreateSolidBrush
GetStockObject
RECT

 

 

Community Additions

Show:
© 2014 Microsoft