#pragma once class CMainFrame: public CFrameWndEx { protected : CMainFrame(); // create function DECLARE_DYNCREATE(CMainFrame); //dynamic create object,avoid the new method static way public: public: public: virtual BOOL PreCreateWindow(CREATESTRUCT &cs); /* loading framework 1. id_resource 2.default style 3.parent window == NULL 4.parent context */ virtual BOOL LoadFrame(UINT nIDResource,DWORD dwDefaultStyle = WS_OVERLAPPEDWINDOW | FWS_ADDTITLE, CWnd * pParentWnd = NULL,CCreateContext *pContext = NULL); public: virtual ~CMainFrame(); #ifdef _DEBUG virtual AssertVaild() const; virtual void Dump (CDumpContext &dc) const; #endif protected: CMFCMenuBar n_wndMenuBar; CMFCToolBar m_wndToolBar; CMFCStatusBar m_wndStatusBar; CMFCToolBarImages m_UserImage; protected: afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); afx_msg void OnViewCustomize(); afx_msg LRESULT OnToolBarCreateNew(WPARAM wp,LPARAM lp); DECLARE_MESSAGE_MAP(); }