InflateRect

2.x

  void InflateRect(lprc, xAmt, yAmt)    
  RECT FAR* lprc; /* address of rectangle */
  int xAmt; /* amount to increase or decrease width */
  int yAmt; /* amount to increase or decrease height */

The InflateRect function increases or decreases the width and height of a rectangle. The InflateRect function adds xAmt units to the left and right ends of the rectangle and adds yAmt units to the top and bottom. The xAmt and yAmt parameters are signed values; positive values increase the width and height, and negative values decrease them.

Parameters

lprc

Points to the RECT structure that increases or decreases in size. The RECT structure has the following form:

typedef struct tagRECT {    /* rc */
   int left;
   int top;
   int right;
   int bottom;
} RECT;

For a full description of this structure, see the Microsoft Windows Programmer's Reference, Volume 3.

xAmt

Specifies the amount to increase or decrease the rectangle width. It must be negative to decrease the width.

yAmt

Specifies the amount to increase or decrease the rectangle height. It must be negative to decrease the height.

Return Value

This function does not return a value.

Comments

The width and height of a rectangle must not be greater than 32,767 units or less than –32,768 units.

See Also

IntersectRect, OffsetRect, UnionRect