Error in creating window
-
Hello! I'm begining with Visual C++. I found article on www.codeproject.com, I mean "Introduce Yourself to VC++ Part I". I have done everything "by the book", but it dosen't work. The message I'm getting from debugger is as follows: ------ Build started: Project: MFCFundamentals1, Configuration: Debug Win32 ------ Compiling... exercise.cpp WINVER not defined. Defaulting to 0x0502 (Windows Server 2003) e:\programy\microsoft visual studio 8\projekty\mfcfundamentals1\mfcfundamentals1\exercise.cpp(17) : error C2664: 'CFrameWnd::Create' : cannot convert parameter 2 from 'const char [17]' to 'LPCTSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast Build log was saved at "file://e:\Programy\Microsoft Visual Studio 8\Projekty\MFCFundamentals1\MFCFundamentals1\Debug\BuildLog.htm" MFCFundamentals1 - 1 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== I'll be greateful for a help! PS. I'm using Visual Studio 2005 (if it makes any difference). Szymon SzyKam
-
Hello! I'm begining with Visual C++. I found article on www.codeproject.com, I mean "Introduce Yourself to VC++ Part I". I have done everything "by the book", but it dosen't work. The message I'm getting from debugger is as follows: ------ Build started: Project: MFCFundamentals1, Configuration: Debug Win32 ------ Compiling... exercise.cpp WINVER not defined. Defaulting to 0x0502 (Windows Server 2003) e:\programy\microsoft visual studio 8\projekty\mfcfundamentals1\mfcfundamentals1\exercise.cpp(17) : error C2664: 'CFrameWnd::Create' : cannot convert parameter 2 from 'const char [17]' to 'LPCTSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast Build log was saved at "file://e:\Programy\Microsoft Visual Studio 8\Projekty\MFCFundamentals1\MFCFundamentals1\Debug\BuildLog.htm" MFCFundamentals1 - 1 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== I'll be greateful for a help! PS. I'm using Visual Studio 2005 (if it makes any difference). Szymon SzyKam
Studio 2005 defaults your projects to use Unicode. So, unless you change that, you either need to specify "wide" strings like that:
L"your text"
or use macro _T:_T("your text")
----------------------------- Get trial copy of FeinViewer - an integrated GDI objects viewer for Microsoft Visual Studio .NET 2005 (8.0) Visual C++ Debugger, and other convenience and productivity tools for Microsoft Visual Studio .NET at at www.FeinSoftware.com -
Studio 2005 defaults your projects to use Unicode. So, unless you change that, you either need to specify "wide" strings like that:
L"your text"
or use macro _T:_T("your text")
----------------------------- Get trial copy of FeinViewer - an integrated GDI objects viewer for Microsoft Visual Studio .NET 2005 (8.0) Visual C++ Debugger, and other convenience and productivity tools for Microsoft Visual Studio .NET at at www.FeinSoftware.com