34 0 118KB
Nume Prenume:Laboratorul nr2. #include #include #define NUM 1000 #define TWOPI (2 * 3.14159) int a[3][6] = { { 123, 343, 100, 163, 232, 166 }, { 128, 15, 129, 74, 234, 255 }, { 1, 2, 3, 4, 1, 4 } }; int circle(HWND hwnd, HDC hdc, int i, int j, int dir, RECT rect, int nr) { HPEN hYellowPen; HBRUSH hRedBrush; hYellowPen = CreatePen(PS_SOLID, 1, RGB(255, 255, 0)); hRedBrush = CreateSolidBrush(RGB(255, 0, 0)); if (j + 150>rect.bottom) { if (dir == 1)a[2][nr] = 2; else a[2][nr] = 3; } if (i + 150>rect.right) { if (dir == 2)a[2][nr] = 3; else a[2][nr] = 4; } if (j + 50