InflateRect

Syntax

void InflateRect(lpRect,X,Y)

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

Parameter Type/Description  

lpRect LPRECT Points to the RECT data structure to be modified.  
X int Specifies the amount to increase or decrease the rectangle width. It must be negative to decrease the width.  
Y int Specifies the amount to increase or decrease the rectangle height. It must be negative to decrease the height.  

Return Value

None.

Comments

The coordinate values of a rectangle must not be greater than 32,767 units or less than –32,768 units. The X and Y parameters must be chosen carefully to prevent invalid rectangles.