How is this error occur?

Is there any mistake in this code?

1
2
3
// i declare these as a global variable
HINSTANCE hEdit1;
#define ID_EDIT1 210; 


1
2
3
4
5
6
7
8
9
10
11
12
13
14
case WM_CREATE:
             {
                   HWND Edit1 = CreateWindowEx(
                                0, L"EDIT",   
                                NULL,         
                                WS_CHILD | WS_VISIBLE | WS_VSCROLL | 
                                ES_LEFT | ES_MULTILINE | ES_AUTOVSCROLL, 
                                0, 0, 0, 0,   
                                hwnd,         
                                (HMENU) ID_EDIT1, //expected `)' before ';'token
                                hEdit1, 
                                NULL); //expected `;' before ')' token        
             }
             break;


I don't know why am i keep these error messages.
Last edited on
I guess ID_EDIT1 is included in a resource.h file.
Try including resource.h at the top of your .cpp file.
I did make a resource file, but i didn't define that variable in my source file. So i don think that is the cause of the problem. 1 more strange error happen, when i change the hmenu argument into NULL, the previous errors gone ?? But i get new error:

cannot convert `const wchar_t*' to `const CHAR*' for argument `2' to `HWND__* CreateWindowExA(DWORD, const CHAR*, const CHAR*, DWORD, int, int, int, int, HWND__*, HMENU__*, HINSTANCE__*, void*)'


I really don't get it...is there something corrupted in my CPP directory?
Ah i get it, it is the L macros, i don't usually use them, and never expect it could cause this weird errors. Sorry for causing some confusion, and thanks for helping me.
Topic archived. No new replies allowed.