TitleBar.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. 
  2. #pragma once
  3. #include "ViewTree.h"
  4. class CTitleToolBar : public CMFCToolBar
  5. {
  6. virtual void OnUpdateCmdUI(CFrameWnd* /*pTarget*/, BOOL bDisableIfNoHndler)
  7. {
  8. CMFCToolBar::OnUpdateCmdUI((CFrameWnd*) GetOwner(), bDisableIfNoHndler);
  9. }
  10. virtual BOOL AllowShowOnList() const { return FALSE; }
  11. };
  12. class CTitleBar : public CDockablePane
  13. {
  14. // 构造
  15. public:
  16. CTitleBar() noexcept;
  17. void AdjustLayout();
  18. void OnChangeVisualStyle();
  19. // 特性
  20. protected:
  21. CViewTree m_wndFileView;
  22. CImageList m_FileViewImages;
  23. CTitleToolBar m_wndToolBar;
  24. protected:
  25. void FillFileView();
  26. //virtual BOOL CanBeResized() const { return FALSE; }; // 不允许改变大小
  27. // 实现
  28. public:
  29. virtual ~CTitleBar();
  30. protected:
  31. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  32. afx_msg void OnSize(UINT nType, int cx, int cy);
  33. afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
  34. afx_msg void OnProperties();
  35. afx_msg void OnFileOpen();
  36. afx_msg void OnFileOpenWith();
  37. afx_msg void OnDummyCompile();
  38. afx_msg void OnEditCut();
  39. afx_msg void OnEditCopy();
  40. afx_msg void OnEditClear();
  41. afx_msg void OnPaint();
  42. afx_msg void OnSetFocus(CWnd* pOldWnd);
  43. DECLARE_MESSAGE_MAP()
  44. };