Rectangle

  BOOL Rectangle(hdc, X1, Y1, X2, Y2)    
  HDC hdc;    
  int X1;    
  int Y1;    
  int X2;    
  int Y2;    

The Rectangle function draws a rectangle. The interior of the rectangle is filled using the current brush, and the border is drawn with the current pen.

Parameters

hdc

Identifies the device context.

X1

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

Y1

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

X2

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

Y2

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

Return Value

The return value specifies whether the rectangle is drawn. It is TRUE if the rectangle is drawn. Otherwise, it is FALSE.

Comments

The current position is neither used nor updated by this function.

See Also

RoundRect