frame.h
上传用户:szled88
上传日期:2015-04-09
资源大小:43957k
文件大小:3k
源码类别:

对话框与窗口

开发平台:

Visual C++

  1. // [!output MAIN_FRAME_HEADER] : interface of the [!output MAIN_FRAME_CLASS] class
  2. //
  3. #pragma once
  4. [!if APP_TYPE_SDI || APP_TYPE_MTLD]
  5. [!if PROJECT_STYLE_EXPLORER]
  6. class [!output VIEW_CLASS];
  7. [!else]
  8. [!if !DOCVIEW]
  9. #include "[!output WND_VIEW_HEADER]"
  10. [!endif]
  11. [!endif]
  12. [!endif]
  13. [!if APP_TYPE_MDI]
  14. class [!output MAIN_FRAME_CLASS] : public [!output XTP_MAIN_FRAME_BASE_CLASS]
  15. {
  16. DECLARE_DYNAMIC([!output MAIN_FRAME_CLASS])
  17. public:
  18. [!output MAIN_FRAME_CLASS]();
  19. [!else]
  20. class [!output MAIN_FRAME_CLASS] : public [!output XTP_MAIN_FRAME_BASE_CLASS]
  21. {
  22. [!if !DOCVIEW]
  23. public:
  24. [!output MAIN_FRAME_CLASS]();
  25. protected:
  26. DECLARE_DYNAMIC([!output MAIN_FRAME_CLASS])
  27. [!else]
  28. protected: // create from serialization only
  29. [!output MAIN_FRAME_CLASS]();
  30. DECLARE_DYNCREATE([!output MAIN_FRAME_CLASS])
  31. [!endif]
  32. [!endif]
  33. // Attributes
  34. [!if SPLITTER || PROJECT_STYLE_EXPLORER]
  35. [!if APP_TYPE_SDI || APP_TYPE_MTLD]
  36. protected:
  37. CSplitterWnd m_wndSplitter;
  38. [!endif]
  39. [!endif]
  40. public:
  41. // Operations
  42. public:
  43. // Overrides
  44. public:
  45. [!if SPLITTER || PROJECT_STYLE_EXPLORER]
  46. [!if APP_TYPE_SDI || APP_TYPE_MTLD]
  47. virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
  48. [!endif]
  49. [!endif]
  50. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  51. [!if !DOCVIEW]
  52. [!if APP_TYPE_SDI]
  53. virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
  54. [!endif]
  55. [!endif]
  56. [!if APP_TYPE_MTLD]
  57. virtual BOOL LoadFrame(UINT nIDResource, DWORD dwDefaultStyle = WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, CWnd* pParentWnd = NULL, CCreateContext* pContext = NULL);
  58. [!endif]
  59. // Implementation
  60. public:
  61. virtual ~[!output MAIN_FRAME_CLASS]();
  62. [!if PROJECT_STYLE_EXPLORER]
  63. [!if APP_TYPE_SDI || APP_TYPE_MTLD]
  64. [!output VIEW_CLASS]* GetRightPane();
  65. [!endif]
  66. [!endif]
  67. #ifdef _DEBUG
  68. virtual void AssertValid() const;
  69. virtual void Dump(CDumpContext& dc) const;
  70. #endif
  71. [!if DOCKING_TOOLBAR || STATUS_BAR]
  72. protected:  // control bar embedded members
  73. [!if STATUS_BAR]
  74. CXTPStatusBar  m_wndStatusBar;
  75. [!endif]
  76. [!endif]
  77. [!if TOOLBAR_STYLE_REBAR]
  78. CReBar      m_wndReBar;
  79. CDialogBar      m_wndDlgBar;
  80. [!endif]
  81. [!if !DOCVIEW]
  82. [!if APP_TYPE_SDI]
  83. [!output WND_VIEW_CLASS]    m_wndView;
  84. [!endif]
  85. [!endif]
  86. [!if DOCK_PANE]
  87. CXTPDockingPaneManager m_paneManager;
  88. CXTPOfficeBorder<CStatic> m_wndOptions;
  89. CXTPOfficeBorder<CEdit> m_wndProperties;
  90. [!endif]
  91. [!if MDITABS]
  92. CXTPTabClientWnd m_MTIClientWnd;
  93. [!endif]
  94. // Generated message map functions
  95. protected:
  96. [!if DOCKING_TOOLBAR || STATUS_BAR]
  97. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  98. [!else]
  99. [!if APP_TYPE_SDI && !DOCVIEW]
  100. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  101. [!endif]
  102. [!endif]
  103. [!if !DOCVIEW]
  104. [!if APP_TYPE_SDI]
  105. afx_msg void OnSetFocus(CWnd *pOldWnd);
  106. [!endif]
  107. [!endif]
  108. [!if APP_TYPE_MTLD]
  109. afx_msg void OnFileClose();
  110. [!endif]
  111. afx_msg void OnClose();
  112. [!if MDITABS]
  113. afx_msg void OnDestroy();
  114. [!endif]
  115. [!if PROJECT_STYLE_EXPLORER]
  116. [!if APP_TYPE_SDI || APP_TYPE_MTLD]
  117. [!if LIST_VIEW]
  118. afx_msg void OnUpdateViewStyles(CCmdUI* pCmdUI);
  119. afx_msg void OnViewStyle(UINT nCommandID);
  120. [!endif]
  121. [!endif]
  122. [!endif]
  123. [!if CUSTOMIZE]
  124. afx_msg void OnCustomize();
  125. [!if CUSTOMIZE_CUSTOM]
  126. afx_msg int OnCreateControl(LPCREATECONTROLSTRUCT lpCreateControl);
  127. [!endif]
  128. [!endif]
  129. [!if DOCK_PANE]
  130. afx_msg LRESULT OnDockingPaneNotify(WPARAM wParam, LPARAM lParam);
  131. [!endif]
  132. DECLARE_MESSAGE_MAP()
  133. };