[!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] // $inplaceframeheader$: $inplaceframeclass$ 类的接口 // #pragma once class $inplaceframeclass$ : public $inplaceframebaseclass$ { DECLARE_DYNCREATE($inplaceframeclass$) public: $inplaceframeclass$(); // 特性 public: // 操作 public: // 重写 [!if DOCKING_TOOLBAR || TOOLBAR_STYLE_REBAR || MENUBAR_TOOLBAR || RIBBON_TOOLBAR] public: virtual BOOL OnCreateControlBars(CFrameWnd* pWndFrame, CFrameWnd* pWndDoc); [!endif] virtual BOOL PreCreateWindow(CREATESTRUCT& cs); // 实现 public: virtual ~$inplaceframeclass$(); #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif protected: [!if DOCKING_TOOLBAR || TOOLBAR_STYLE_REBAR || MENUBAR_TOOLBAR || RIBBON_TOOLBAR] [!if MENUBAR_TOOLBAR || RIBBON_TOOLBAR] CMFCToolBar m_wndToolBar; [!else] CToolBar m_wndToolBar; [!endif] [!if TOOLBAR_STYLE_REBAR] CDialogBar m_wndDlgBar; CReBar m_wndReBar; [!endif] [!endif] COleDropTarget m_dropTarget; COleResizeBar m_wndResizeBar; // 生成的消息映射函数 protected: afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); DECLARE_MESSAGE_MAP() };