1. 生成empty win32 project
2. 加入My1stWTL70Win.cpp
int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPTSTR lpstrCmdLine, int nCmdShow)
{...}
int Run(LPTSTR /*lpstrCmdLine*/ = NULL, int nCmdShow = SW_SHOWDEFAULT)
{...}
3. 添加MyMainWnd Class
class MyMainWnd : public CFrameWindowImpl<MyMainWnd>
{
public:
MyMainWnd();
virtual ~MyMainWnd();
};
Error:
MyMainWnd.cpp
d:/study/wtl/hellowtl70/my1stwtl70win/mymainwnd.h(12) : error C2504: 'CFrameWindowImpl' : base class undefined
d:/study/wtl/hellowtl70/my1stwtl70win/mymainwnd.h(12) : error C2143: syntax error : missing ',' before '<'
d:/study/wtl/hellowtl70/my1stwtl70win/mymainwnd.h(12) : error C2059: syntax error : '<'
Error executing cl.exe.
4. 去掉MyMainWnd.cpp文件,OK ?<