摘要:
#include <afxwin.h>#include "resource.h"class MyDocument : public CDocument{ DECLARE_DYNCREATE(MyDocument)//声明run-time类};IMPLEMENT_DYNCREATE(MyDocument,CDocument)//声明MyDocument为run-time类class My... 阅读全文
摘要:
#include <afxwin.h>#include "resource.h"class MyFrame:public CFrameWnd{private: CMenu *FMenu;public: MyFrame() { Create(NULL,"Hello MFC");//建立窗口 FMenu = new CMenu;//产生菜单 FMenu->LoadMenu(ID... 阅读全文
摘要:
#include <afxwin.h>//编写窗口程序时,必须加载此文件,该文件中定义了所有的MFC类class MyApp:public CWinApp//以继承的方式借用MFC的类{public:BOOL InitInstance()//程序入口点{CFrameWnd *Frame = new CFrameWnd();m_pMainWnd = Frame;//窗口框架对象Frame... 阅读全文