mainfrm.h
上传用户:dfguandao
上传日期:2020-06-07
资源大小:23k
文件大小:2k
源码类别:

工具条

开发平台:

Visual C++

  1. #ifndef __AFXEXT_H__
  2. #include <afxext.h>         // for access to CToolBar and CStatusBar
  3. #endif
  4. #include "palette.h"        // for access to CPaletteBar
  5. // Instead of using a class here we could have just put these controls
  6. // directly into CMainFrame.  As it is they are sending messages to the
  7. // main frame just like they were part of it instead of part of a control
  8. // bar.
  9. class CStyleBar : public CToolBar
  10. {
  11. public:
  12. CComboBox   m_comboBox;
  13. CFont       m_font;
  14. };
  15. class CMainFrame : public CFrameWnd
  16. {
  17. // Constructor
  18. public:
  19. CMainFrame();
  20. // Attributes
  21. public:
  22. BOOL m_bInsert;     // TRUE => insert mode, FALSE => overstrike mode
  23. // Operations
  24. public:
  25. // Implementation
  26. public:
  27. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  28. virtual ~CMainFrame();
  29. #ifdef _DEBUG
  30. virtual void AssertValid() const;
  31. virtual void Dump(CDumpContext& dc) const;
  32. #endif
  33. BOOL CreateStyleBar();
  34. BOOL CreateToolBar();
  35. BOOL CreatePaletteBar();
  36. BOOL CreateStatusBar();
  37. protected:  // control bar embedded members
  38. CStatusBar  m_wndStatusBar;
  39. CToolBar    m_wndToolBar;
  40. CStyleBar   m_wndStyleBar;
  41. CPaletteBar m_wndPaletteBar;
  42. CDialogBar  m_wndDlgBar;
  43. UINT        m_nPaletteCol;
  44. BOOL        m_bDialogTop;
  45. // Generated message map functions
  46. protected:
  47. //{{AFX_MSG(CMainFrame)
  48. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  49. afx_msg void OnViewDlgbarTop();
  50. afx_msg void OnUpdateViewDlgbartop(CCmdUI* pCmdUI);
  51. afx_msg BOOL OnViewBar(UINT nID);
  52. afx_msg void OnUpdateBarMenu(CCmdUI* pCmdUI);
  53. afx_msg void OnViewShort();
  54. afx_msg void OnViewLong();
  55. afx_msg void OnUpdateInsert(CCmdUI* pCmdUI);
  56. afx_msg void OnToggleInsert();
  57. afx_msg void OnViewPalette();
  58. afx_msg void OnUpdatePaletteMenu(CCmdUI* pCmdUI);
  59. afx_msg void OnSelChangePalette();
  60. afx_msg void OnPalette2column();
  61. afx_msg void OnPalette3column();
  62. afx_msg void OnUpdatePalette3column(CCmdUI* pCmdUI);
  63. afx_msg void OnUpdatePalette2column(CCmdUI* pCmdUI);
  64. //}}AFX_MSG
  65. afx_msg void OnUpdateStyle(CCmdUI* pCmdUI);
  66. afx_msg void OnChangeStyle(UINT nID);
  67. afx_msg void OnPalette(UINT nID);
  68. afx_msg void OnUpdatePalette(CCmdUI* pCmdUI);
  69. DECLARE_MESSAGE_MAP()
  70. };
  71. /////////////////////////////////////////////////////////////////////////////