Windows API

hello, i am programming a sudoku solver with the windows api. ive created one in a dos window but now im just practicing windows api.. so my problem is i created a funtion to draw the board:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
void DrawBoard()
{
	x = 10;
	y = 10;
	int count = 0;

	for (int i = 0; i < 81; i++)
	{
		boxes[i] = CreateWindow(TEXT("Edit"), NULL, WS_CHILD | WS_BORDER | WS_VISIBLE, x, y, 20, 20, Hwnd, NULL, NULL, NULL);
		
		x += 30;
		count++;

		if (count == 9)
		{
			y += 30;
			x = 10;
			count = 0;
		}
	}
}


it does what i want except when i code the window procedure and have it process wm_quit or wm_close or wm_destroy it ALWAYS closes the app when i click a textbox to input text.........??? why is it sending off theese messages.... if i dont code it to process theese messages it wrks perfectly except i cant close the window without manually stopping debugging.. well the window dissapears when the press the x in the top right but it doesnt return 0 or anything for that matter so i assume the app is still running just not visibly
Last edited on
Topic archived. No new replies allowed.