下面这个程序以前在visual c++6.0中很正常,但是在visual stdio2005中出现错误,错误提示为
1> WINVER not defined. Defaulting to 0x0502 (Windows Server 2003)
1>e:\visual studio 2005\projects\gfhjj\gfhjj\gfhjj.cpp(15) : error C2664: 'CFrameWnd::Create' : cannot convert parameter 2 from 'const char [10]' to 'LPCTSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>生成日志保存在“file://e:\Visual Studio 2005\Projects\gfhjj\gfhjj\Debug\BuildLog.htm”
1>gfhjj - 1 个错误,0 个警告
========== 生成: 0 已成功, 1 已失败, 0 最新, 0 已跳过 ==========
程序:
#include<afxwin.h>
class MyApp:public CWinApp
{
public:
BOOL InitInstance()
{
CFrameWnd *Frame=new CFrameWnd();
m_pMainWnd=Frame;
Frame->Create(NULL,"Hello MFC");
Frame->ShowWindow(SW_SHOW);
return true;
}
};
MyApp a_app;
请问是怎么回事,急!!!!