#include <windows.h>
int WinAPI WinMain(HISTANCE hInstace,HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)
{
MessageBox(NULL, TEXT("Hello World"), TEXT("Hello Window),0);
return 0;
}
Error
1>c:\users\128a5s5\documents\visual studio 2010\projects\27\27\27.cpp(3): error C2146: syntax error : missing ';' before identifier 'WinMain'
1>c:\users\128a5s5\documents\visual studio 2010\projects\27\27\27.cpp(3): error C2065: 'HISTANCE' : undeclared identifier
1>c:\users\128a5s5\documents\visual studio 2010\projects\27\27\27.cpp(3): error C2146: syntax error : missing ')' before identifier 'hInstace'
1>c:\users\128a5s5\documents\visual studio 2010\projects\27\27\27.cpp(3): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\128a5s5\documents\visual studio 2010\projects\27\27\27.cpp(3): error C2365: 'WinMain' : redefinition; previous definition was 'function'
1> c:\program files\microsoft sdks\windows\v7.0a\include\winbase.h(2588) : see declaration of 'WinMain'
1>c:\users\128a5s5\documents\visual studio 2010\projects\27\27\27.cpp(3): error C2059: syntax error : ')'
1>c:\users\128a5s5\documents\visual studio 2010\projects\27\27\27.cpp(4): error C2143: syntax error : missing ';' before '{'
1>c:\users\128a5s5\documents\visual studio 2010\projects\27\27\27.cpp(4): error C2447: '{' : missing function header (old-style formal list?)
1>c:\users\128a5s5\documents\visual studio 2010\projects\27\27\27.cpp(5): error C2001: newline in constant
1>c:\users\128a5s5\documents\visual studio 2010\projects\27\27\27.cpp(5): fatal error C1057: unexpected end of file in macro expansion
Hi, I'm still a bigineer in this WinAPI things, I tried the code above, but it doesn't works, can I know which part I did a mistake? Really Thanks!