[!if RIBBON_TOOLBAR] // 这段 MFC 示例源代码演示如何使用 MFC Microsoft Office Fluent 用户界面 // (“Fluent UI”)。该示例仅供参考, // 用以补充《Microsoft 基础类参考》和 // MFC C++ 库软件随附的相关电子文档。 // 复制、使用或分发 Fluent UI 的许可条款是单独提供的。 // 若要了解有关 Fluent UI 许可计划的详细信息,请访问 // https://go.microsoft.com/fwlink/?LinkId=238214. // // 版权所有(C) Microsoft Corporation // 保留所有权利。 [!endif] // $childframeheader$: $childframeclass$ 类的接口 // #pragma once [!if PROJECT_STYLE_EXPLORER] class $viewclass$; [!endif] [!if !DOCVIEW] #include "$wndviewheader$" [!endif] class $childframeclass$ : public $childframebaseclass$ { DECLARE_DYNCREATE($childframeclass$) public: $childframeclass$() noexcept; // 特性 [!if APP_TYPE_MDI && SPLITTER || PROJECT_STYLE_EXPLORER] protected: [!if APP_TYPE_TABBED_MDI] CSplitterWndEx m_wndSplitter; [!else] CSplitterWnd m_wndSplitter; [!endif] [!endif] public: // 操作 public: // 重写 [!if APP_TYPE_MDI && SPLITTER] public: [!endif] [!if PROJECT_STYLE_EXPLORER || !CHILD_FRAME_DEFAULT_STYLES || !DOCVIEW] public: [!endif] [!if APP_TYPE_MDI && SPLITTER] virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext); [!else] [!if PROJECT_STYLE_EXPLORER] virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext); [!endif] [!endif] virtual BOOL PreCreateWindow(CREATESTRUCT& cs); [!if !DOCVIEW] virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo); [!endif] // 实现 public: [!if !DOCVIEW] // 框架工作区的视图。 $wndviewclass$ m_wndView; [!endif] virtual ~$childframeclass$(); #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif [!if PROJECT_STYLE_EXPLORER] protected: $viewclass$* GetRightPane(); [!endif] // 生成的消息映射函数 protected: [!if !DOCVIEW] afx_msg void OnFileClose(); afx_msg void OnSetFocus(CWnd* pOldWnd); afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); [!endif] [!if PROJECT_STYLE_EXPLORER] [!if LIST_VIEW] afx_msg void OnUpdateViewStyles(CCmdUI* pCmdUI); afx_msg void OnViewStyle(UINT nCommandID); [!endif] [!endif] [!if PRINTING] [!if RIBBON_TOOLBAR] afx_msg void OnFilePrint(); afx_msg void OnFilePrintPreview(); afx_msg void OnUpdateFilePrintPreview(CCmdUI* pCmdUI); [!endif] [!endif] DECLARE_MESSAGE_MAP() };