ViewManager.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. #if !defined(AFX_VIEWMANAGER_H__2A1E6B81_0BC9_11D3_933D_0000F0510AC9__INCLUDED_)
  2. #define AFX_VIEWMANAGER_H__2A1E6B81_0BC9_11D3_933D_0000F0510AC9__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // ViewManager.h : header file
  7. //
  8. #include <afxcoll.h>
  9. #include "WindowTabCtrl.h"
  10. /////////////////////////////////////////////////////////////////////////////
  11. // CViewManager window
  12. class CViewManager : public CControlBar
  13. {
  14. DECLARE_DYNAMIC(CViewManager)
  15. private:
  16. CSize m_sizeDefault;
  17. CSize m_sizeMRU;
  18. int m_nLMargin;
  19. UINT m_nDockID;
  20. // Construction
  21. public:
  22. CViewManager();
  23. // Attributes
  24. public:
  25. // Operations
  26. public:
  27. virtual BOOL Create(LPCTSTR lpszWindowName, CWnd* pParentWnd,
  28. CSize sizeDefault, UINT nID,
  29. DWORD dwStyle = WS_CHILD | WS_VISIBLE | CBRS_TOP);
  30. void OnActivateView(const BOOL bActivate, CView* pView);
  31. int GetWindowNum();
  32. void SetViewName(const TCHAR* cs, CView* pView);
  33. void RemoveAll();
  34. void RemoveView(CView* pView);
  35. void AddView(const TCHAR* csName, CView* pView);
  36. CPtrArray m_arViews;
  37. CStringArray m_arViewTitles;
  38. BOOL m_bClosing;
  39. // Overrides
  40. virtual void DoPaint(CDC* pDC);
  41. virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
  42. virtual CSize CalcFixedLayout(BOOL bStretch, BOOL bHorz);
  43. virtual CSize CalcDynamicLayout(int nLength, DWORD nMode);
  44. // ClassWizard generated virtual function overrides
  45. //{{AFX_VIRTUAL(CViewManager)
  46. //}}AFX_VIRTUAL
  47. // Implementation
  48. public:
  49. virtual ~CViewManager();
  50. BOOL CreateViewManager(CMDIFrameWnd* pMDIFrameWnd, UINT uID);
  51. CWindowTabCtrl m_ViewTabCtrl;
  52. CImageList m_ViewTabImages;
  53. // Generated message map functions
  54. protected:
  55. void DrawGripper(CDC* pDC);
  56. //{{AFX_MSG(CViewManager)
  57. afx_msg void OnSize(UINT nType, int cx, int cy);
  58. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  59. afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
  60. afx_msg void OnWindowPosChanging(WINDOWPOS FAR* lpwndpos);
  61. //}}AFX_MSG
  62. BOOL OnViewManagerToolTip(UINT id, NMHDR* pTTTStruct, LRESULT * pResult);
  63. DECLARE_MESSAGE_MAP()
  64. };
  65. /////////////////////////////////////////////////////////////////////////////
  66. //{{AFX_INSERT_LOCATION}}
  67. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  68. #endif // !defined(AFX_VIEWMANAGER_H__2A1E6B81_0BC9_11D3_933D_0000F0510AC9__INCLUDED_)