OffsetRect

  BOOL OffsetRect(lprc, X, Y)    
  LPRECT lprc; /* address of structure with rectangle */
  int X; /* horizontal offset */
  int Y; /* vertical offset */

This function moves the given rectangle by the specified offsets. The OffsetRect function moves the rectangle X units along the x-axis and Y units along the y-axis. The X and Y parameters are signed values, so the rectangle can be moved left or right, and up or down.

Parameters

lprc

Points to a RECT structure that contains the rectangle to be moved.

X

Specifies the amount to move left or right. It must be negative to move left.

Y

Specifies the amount to move up or down. It must be negative to move up.

Return Value

FALSE on error, TRUE on success

Comments

The coordinate values of a rectangle must not be greater than MAXCOORD or less than MINCOORD. The X and Y parameters must be chosen carefully to prevent invalid rectangles.