1. 程式人生 > 其它 >MFC 視窗例項(1)

MFC 視窗例項(1)

#include <afxwin.h>
class MyApp :public CWinApp
{
public:
	BOOL InitInstance()
	{
		CFrameWnd* Frame = new CFrameWnd();
		Frame->Create(NULL, _T("salman"));   //建立視窗
		Frame->ShowWindow(SW_SHOW);  //顯示視窗
		m_pMainWnd = Frame;   //將m_pMainWnd設定為Frame;
		return true;
	}
};
MyApp theApp;   //建立應用程式

會生成一個簡潔的介面。