don't know whats the problem with code

I'm trying to create a button using Win32

1
2
3
4
5
6
7
8
9
10
case WM_CREATE:
		{
			CreateWindow(TEXT("BUTTON"), TEXT("testing"),
				WS_VISIBLE | WS_CHILD,
				10,10,80,20,
				hWnd, (HMENU) ID_BUTTON, NULL, NULL
				);

			break;
		}


but i get the error C2059: syntax error : ',' on the line with );
but i add another comma it gives more errors

the solution is probably very simple i just can't see it
ok i found that if i replace (HMENU) ID_BUTTON with NULL then it works.
does anyone know why this happened?

i defined the button the the top of my code
#define ID_BUTTON

i defined the button the the top of my code
#define ID_BUTTON


You need to do better than that. You need to assign a number to it, i.e., ...

 
#define ID_BUTTON    2000 
Topic archived. No new replies allowed.