#include "..\CookHeader.h"
#include <Windows.h>
#include <conio.h>

HWND hwnd;
HDC hdc;
int circleNumber = 0;
int wSize = 1000;
int radius = 400;

void drawCircle(int x, int y, int r) {
	circleNumber++;
	Ellipse(hdc, x - r, y - r, x + r, y + r);
	string strNum = to_string(circleNumber);
	TextOut(hdc, x, y-r, (LPCWSTR)strNum.c_str(), 1);
	if (r >= radius / 2) {
		drawCircle(x - r / 2, y, r / 2);
		drawCircle(x + r / 2, y, r / 2);
	}
}

int main() {
	_getch();
	hwnd = GetForegroundWindow();
	hdc = GetDC(hwnd); // hdc = GetDC(NULL);
	
	drawCircle(wSize / 2, wSize / 2, radius);	

	ReleaseDC(hwnd, hdc);	
}