/reference/MainFrm.h

# · C Header · 91 lines · 59 code · 15 blank · 17 comment · 1 complexity · 7db0069a05ff56b7cda9ee41f1f1077d MD5 · raw file

  1. // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
  2. // (the "Fluent UI") and is provided only as referential material to supplement the
  3. // Microsoft Foundation Classes Reference and related electronic documentation
  4. // included with the MFC C++ library software.
  5. // License terms to copy, use or distribute the Fluent UI are available separately.
  6. // To learn more about our Fluent UI licensing program, please visit
  7. // http://msdn.microsoft.com/officeui.
  8. //
  9. // Copyright (C) Microsoft Corporation
  10. // All rights reserved.
  11. // MainFrm.h : interface of the CMainFrame class
  12. //
  13. #pragma once
  14. #include "FileView.h"
  15. #include "ClassView.h"
  16. #include "OutputWnd.h"
  17. #include "PropertiesWnd.h"
  18. #include "CalendarBar.h"
  19. #include "Resource.h"
  20. class COutlookBar : public CMFCOutlookBar
  21. {
  22. virtual BOOL AllowShowOnPaneMenu() const { return TRUE; }
  23. virtual void GetPaneName(CString& strName) const { BOOL bNameValid = strName.LoadString(IDS_OUTLOOKBAR); ASSERT(bNameValid); if (!bNameValid) strName.Empty(); }
  24. };
  25. class CMainFrame : public CMDIFrameWndEx
  26. {
  27. DECLARE_DYNAMIC(CMainFrame)
  28. public:
  29. CMainFrame();
  30. // Attributes
  31. public:
  32. // Operations
  33. public:
  34. // Overrides
  35. public:
  36. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  37. // Implementation
  38. public:
  39. virtual ~CMainFrame();
  40. #ifdef _DEBUG
  41. virtual void AssertValid() const;
  42. virtual void Dump(CDumpContext& dc) const;
  43. #endif
  44. protected: // control bar embedded members
  45. CMFCRibbonBar m_wndRibbonBar;
  46. CMFCRibbonApplicationButton m_MainButton;
  47. CMFCToolBarImages m_PanelImages;
  48. CMFCRibbonStatusBar m_wndStatusBar;
  49. CFileView m_wndFileView;
  50. CClassView m_wndClassView;
  51. COutputWnd m_wndOutput;
  52. CPropertiesWnd m_wndProperties;
  53. COutlookBar m_wndNavigationBar;
  54. CMFCShellTreeCtrl m_wndTree;
  55. CCalendarBar m_wndCalendar;
  56. CMFCCaptionBar m_wndCaptionBar;
  57. // Generated message map functions
  58. protected:
  59. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  60. afx_msg void OnWindowManager();
  61. afx_msg void OnApplicationLook(UINT id);
  62. afx_msg void OnUpdateApplicationLook(CCmdUI* pCmdUI);
  63. afx_msg void OnViewCaptionBar();
  64. afx_msg void OnUpdateViewCaptionBar(CCmdUI* pCmdUI);
  65. afx_msg void OnOptions();
  66. afx_msg void OnSettingChange(UINT uFlags, LPCTSTR lpszSection);
  67. DECLARE_MESSAGE_MAP()
  68. BOOL CreateDockingWindows();
  69. void SetDockingWindowIcons(BOOL bHiColorIcons);
  70. BOOL CreateOutlookBar(CMFCOutlookBar& bar, UINT uiID, CMFCShellTreeCtrl& tree, CCalendarBar& calendar, int nInitialWidth);
  71. BOOL CreateCaptionBar();
  72. int FindFocusedOutlookWnd(CMFCOutlookBarTabCtrl** ppOutlookWnd);
  73. CMFCOutlookBarTabCtrl* FindOutlookParent(CWnd* pWnd);
  74. CMFCOutlookBarTabCtrl* m_pCurrOutlookWnd;
  75. CMFCOutlookBarPane* m_pCurrOutlookPage;
  76. };