// Рисование грузовика
void drawTruck (HDC hdc, int x, int y) {
HPEN hPen CreatePen (PS_SOLID, 3, RGB(0, 0, 200));
SelectObject(hdc, hPen);
Rectangle(hdc, 0x, 30 + y 40 + x 50 + y ) ;
Rectangle(hdc, 10 + x 10 + y 40 + x 30 + y ) ;
Rectangle(hdc, 40+ x, y, 100 + x 50 + y )
hPen CreatePen (PS_SOLID, 3, RGB(100, 0, 0));
SelectObject(hdc, hPen);
Ellipse(hdc, 10 + x 40 + y 30 + x 60 + y )
Ellipse(hdc, 70 + x 40 + y 90 + x 60 + y ) ;
132
133
void drawTrucks1(HDC hdc) {
134
drawTruck(hdc, 10, 10);
135
drawTruck(hdc, 10, 310);
136
drawTruck(hdc, 310, 10);
137
drawTruck(hdc, 310, 310);
138
drawTruck(hdc, 160, 160);
139
}
140