低レベルな質問で申し訳ないです。Visual C++を勉強しだした者です。
MFCによる最も簡単なWindowsアプリケーションを書いています。↓( ただ、タイトルバーにタイトルを表示するだけ )
SimpleMfcApp.cpp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#ifndef WINVER
#define WINVER 0x0501
#endif
#include <afxwin.h>
class CSimpleMfcWnd : public CFrameWnd
{
public:
CSimpleMfcWnd()
{
Create( NULL, "最も簡単なMFCアプリケーション" );
}
DECLARE_MESSAGE_MAP()
};
class CSimpleMfcApp : public CWinApp
{
public:
BOOL InitInstance() //オーバーライド
{
m_pMainWnd = new CSimpleMfcWnd(); //CSimpleMfcWndクラスのインスタンス生成
m_pMainWnd->ShowWindow( m_nCmdShow );
m_pMainWnd->UpdateWindow();
return TRUE;
}
};
//メッセージマップのマクロ
BEGIN_MESSAGE_MAP( CSimpleMfcWnd, CFrameWnd )
END_MESSAGE_MAP()
CSimpleMfcApp app; //インスタンスを生成
- - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
エラー出力
\simplemfcapp.cpp(11) : error C2664: 'CFrameWnd::Create' : 2 番目の引数を 'const char [30]' から 'LPCTSTR' に変換できません。
#define WINVER 0x0501 <-を 0x0400 にすると、↑のエラーは消えますが、↓のエラーが出ます。
c:\program files\microsoft sdks\windows\v6.0a\include\sdkddkver.h(217) : fatal error C1189: #error : _WIN32_WINNT settings conflicts with _WIN32_IE setting
これは、SDKのバージョンの違いなのでしょうか?
現在、右も左も分からない状態です。
アドバイスを宜しくお願いします。
PC OS : XP home edition