hi,
I have downloaded the source code for the NeHe tutorial lesson 1.
The .exe file works fine, but when I copy paste the code into a .cpp file and try to compile it I am getting many compiling errors.
These are the errors I got :
Error 1 error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [29]' to 'LPCWSTR' f:\documents and settings\kinder\my documents\visual studio 2005\projects\nehetutorial1\nehetutorial1\nehetutorial1.cpp 80
Error 5 error C2664: 'UnregisterClassW' : cannot convert parameter 1 from 'const char [7]' to 'LPCWSTR' f:\documents and settings\kinder\my documents\visual studio 2005\projects\nehetutorial1\nehetutorial1\nehetutorial1.cpp 102
Error 11 error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'const char [7]' to 'LPCWSTR' f:\documents and settings\kinder\my documents\visual studio 2005\projects\nehetutorial1\nehetutorial1\nehetutorial1.cpp 202
A short piece of code where the errors come from :
// If The Mode Fails, Offer Two Options. Quit Or Use Windowed Mode.
if (MessageBox(NULL,"The Requested Fullscreen Mode Is Not Supported By\nYour Video Card. Use Windowed Mode Instead?","NeHe GL",MB_YESNO|MB_ICONEXCLAMATION)==IDYES)
{
fullscreen=FALSE; // Windowed Mode Selected. Fullscreen = FALSE
}
else
{
// Pop Up A Message Box Letting User Know The Program Is Closing.
MessageBox(NULL,"Program Will Now Close.","ERROR",MB_OK|MB_ICONSTOP);
return FALSE; // Return FALSE
}
}
}
It seemes like this lesson is working for other people, so I don't see where the error comes from.
amoK