I wanted to try a small MFC project, Igot the following error when i compile.
error C2664: ‘CFrameWnd::Create’ : cannot convert parameter 2 from ‘const char [39]‘ to ‘LPCTSTR’
After searching on the internet, found out the reason is: project is setup to use Unicode. If you use _T macro while using string literals it will work for both the UNICODE and the ANSI string literals. T macro simply redirects to UNICODE or ANSI type.
solution:
Use the TEXT macro:
Create( NULL, TEXT( “MFC Tutorial Part 1 CoderSource Window” ) );
or
Create( NULL, _T(”MFC Fundamentals”));
One Response
myspace design
June 7th, 2008 at 10:35 am
1Great work! And nice job doing a blog/handbook.
RSS feed for comments on this post · TrackBack URI
Leave a reply