最小的MFC程序
1 #include <afxwin.h>
2
3 class CMyWinApp:public CWinApp
4 {
5 public:
6 BOOL InitInstance()
7 {
8 CFrameWnd *pwin=new CFrameWnd;
9 m_pMainWnd=pwin;
10 pwin->Create(0,_T("Hello"));
11 pwin->ShowWindow(SW_SHOW);
12 return TRUE;
13 }
14
15 };
16
17 CMyWinApp theApp;
2
3 class CMyWinApp:public CWinApp
4 {
5 public:
6 BOOL InitInstance()
7 {
8 CFrameWnd *pwin=new CFrameWnd;
9 m_pMainWnd=pwin;
10 pwin->Create(0,_T("Hello"));
11 pwin->ShowWindow(SW_SHOW);
12 return TRUE;
13 }
14
15 };
16
17 CMyWinApp theApp;
我最擅长从零开始创造世界,所以从来不怕失败,它最多也就让我一无所有。