中易网

关于visual stdio2005

答案:1  悬赏:60  
解决时间 2021-04-27 15:57
  • 提问者网友:前事回音
  • 2021-04-27 08:42

下面这个程序以前在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;

 

 

 

请问是怎么回事,急!!!!

最佳答案
  • 二级知识专家网友:為→妳鎖鈊
  • 2021-04-27 09:27
  Frame->Create(NULL, _T("Hello MFC")); // 加个_T宏套上试试
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息!
大家都在看
推荐信息