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.

InflateRect function

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

Syntax


BOOL InflateRect(
  _Inout_  LPRECT lprc,
  _In_     int dx,
  _In_     int dy
);

Parameters

lprc [in, out]

A pointer to the RECT structure that increases or decreases in size.

dx [in]

The amount to increase or decrease the rectangle width. This parameter must be negative to decrease the width.

dy [in]

The amount to increase or decrease the rectangle height. This parameter must be negative to decrease the height.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero.

Remarks

Because applications can use rectangles for different purposes, the rectangle functions do not use an explicit unit of measure. Instead, all rectangle coordinates and dimensions are given in signed, logical values. The mapping mode and the function in which the rectangle is used determine the units of measure.

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

Rectangles Overview
Rectangle Functions
IntersectRect
OffsetRect
RECT
UnionRect

 

 

Community Additions

Show:
© 2014 Microsoft