Drawing a rectangleΒΆ
Rectangle() |
Draw a rectangle |
SYNTAX
Rectangle(window_id, left, top, right, bottom)
Draw a rectangle, using the current pen to draw the line and filling it with the current brush.
window_id |
The identifier of the window in which the rectangle is to be drawn. To print it in the current report, specify NULL instead of a window_id. |
The remaining parameters specify the positions of the corners of the rectangle, as follows:
left |
The x co-ordinate of the upper-left corner of the rectangle |
top |
The y co-ordinate of the upper-left corner of the rectangle |
right |
The x co-ordinate of the lower-right corner of the rectangle |
bottom |
The y co-ordinate of the lower-right corner of the rectangle |
EXAMPLE
BeginPaint(wintask,10,10)
SetPenColor(wintask, RGB_YELLOW)
SetPenType(wintask, DP_SOLID)
SetPenWidth(wintask, 2)
SetBrushColor(wintask, RGB_GREEN, RGB_MAGENTA)
SetBrushType(wintask, DB_DIAGCROSS)
Rectangle(wintask,30,10,170,100)
SetPenColor(wintask, RGB_BLACK)
SetPenType(wintask, DP_DASHDOTDOT)
SetPenWidth(wintask, 1)
SetBrushColor(wintask, RGB_LIGHTSKYBLUE, RGB_LIGHTSKYBLUE)
SetBrushType(wintask, DB_SOLID)
Rectangle(wintask,220,10,360,100)
EndPaint(wintask)
RELATED TOPICS |