[問題] 執行MFC 出現WINVER not defined.
我是剛學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
→
11/27 09:57, , 1F
11/27 09:57, 1F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章