SetRect

2.x

  void SetRect(lprc, nLeft, nTop, nRight, nBottom)    
  RECT FAR* lprc; /* address of structure with rectangle to set */
  int nLeft; /* left side */
  int nTop; /* top side */
  int nRight; /* right side */
  int nBottom; /* bottom side, */  

The SetRect function sets rectangle coordinates. The action of this function is equivalent to assigning the left, top, right, and bottom arguments to the appropriate members of the RECT structure.

Parameters

lprc

Points to the RECT structure that contains the rectangle to be set. 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.

nLeft

Specifies the x-coordinate of the upper-left corner.

nTop

Specifies the y-coordinate of the upper-left corner.

nRight

Specifies the x-coordinate of the lower-right corner.

nBottom

Specifies the y-coordinate of the lower-right corner.

Return Value

This function does not return a value.

Comments

The width of the rectangle, specified by the absolute value of nRightnLeft, must not exceed 32,767 units. This limit also applies to the height of the rectangle.

See Also

CopyRect, SetRectEmpty