By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,919 Members | 1,587 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,919 IT Pros & Developers. It's quick & easy.

About MFC cannot convert parameter 1 from 'const char [42]' to 'LPCTSTR'

P: 1

I am a newbies in .NET and i am followin a tutorial to create my first MFC program but when a compile a have this problem:
See the file attach!

Please help

c:\documents and settings\propriétaire\mes documents\visual studio 2005\projects\hellomfc\hellomfc\hellomfcdlg.cpp(15 8) : error C2664: 'CWnd::SetWindowTextW' : cannot convert parameter 1 from 'const char [42]' to 'LPCTSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Build log was saved at "file://c:\Documents and Settings\Propriétaire\Mes documents\Visual Studio 2005\Projects\HelloMFC\HelloMFC\Debug\BuildLog.htm "
HelloMFC - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Apr 14 '06 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 5K+
P: 8,916
The "attached code" does not appear to actually be attached. Can you post it please as I am having trouble recreating the error here.
Apr 18 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.