作者aada (aada)
看板C_and_CPP
标题[问题] 执行MFC 出现WINVER not defined.
时间Fri Nov 27 03:40:11 2009
我是刚学MFC的新手,
目前读的精通MFC视窗程式设计 visual studio 2008版,
而我照着书上的测试第一个范例 Hello MFC 竟然出错了
而我是在XP系统下才写程式的,
错误提示如下
1>HelloMFC.cpp
1> WINVER not defined. Defaulting to 0x0600 (Windows Vista)
1>c:\program files\microsoft visual studio 9.0\vc\atlmfc\include\afxwin.h(26)
: fatal error C1189:
#error : Your version of the Windows SDK is earlier
than 6.0. Try setting the 'WINVER' and '_WIN32_WINNT' definitions in your
project to less than 0x0600.
程式码如下
#include <afxwin.h>
class MyApp : public CwinApp
{
public:
BOOL InitInstance()
{
CFrameWnd *Frame = new CFrameWnd();
m_pMainWnd = Frame;
Frame->Create(NULL,"Hellp MFC");
Frame->ShowWindow(SW_SHOW);
return true;
}
};
MyApp a_app;
是否能帮忙解答呢,谢谢
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.122.193.103
1F:→ TeaEEE:你专案可能选错了 重建一个MFC的专案可能比较快 11/27 09:57