31.2.20 Rectangles

Rectangle functions alter and obtain information about rectangles in a window's client area. In Windows, a rectangle is defined by a RECT data structure. The structure contains two points: the upper-left and lower-right corners of the rectangle. The sides of a rectangle extend from these two points and are parallel to the x- and y-axes. The following list briefly describes each rectangle function:

Function Description

CopyRect Makes a copy of an existing rectangle
EqualRect Determines whether two rectangles are equal
InflateRect Expands or shrinks the specified rectangle
IntersectRect Finds the intersection of two rectangles
IsRectEmpty Determines whether the specified rectangle is empty
OffsetRect Moves a given rectangle
PtInRect Indicates whether a specified point lies within a given rectangle
SetBoundsRect Controls bounds accumulation.
SetRect Fills in a rectangle data structure
SetRectEmpty Sets a rectangle to an empty rectangle
SubtractRect Subtracts one rect from another.
UnionRect Stores the union of two rectangles
DrawFocusRect Draws a rectangle in the style used to indicate focus
FillRect Fills a given rectangle by using the specified brush
FrameRect Draws a border for the given rectangle
InvertRect Inverts the display bits of the specified rectangle
Rectangle Draws a rectangle
RoundRect Draws a rounded rectangle