ResizableMDIFrame.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. // ResizableMDIFrame.h : header file
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. //
  5. // This file is part of ResizableLib
  6. // https://github.com/ppescher/resizablelib
  7. //
  8. // Copyright (C) 2000-2015 by Paolo Messina
  9. // mailto:ppescher@hotmail.com
  10. //
  11. // The contents of this file are subject to the Artistic License 2.0
  12. // http://opensource.org/licenses/Artistic-2.0
  13. //
  14. // If you find this code useful, credits would be nice!
  15. //
  16. /////////////////////////////////////////////////////////////////////////////
  17. #if !defined(AFX_RESIZABLEMDIFRAME_H__INCLUDED_)
  18. #define AFX_RESIZABLEMDIFRAME_H__INCLUDED_
  19. #if _MSC_VER > 1000
  20. #pragma once
  21. #endif // _MSC_VER > 1000
  22. #include "ResizableMinMax.h"
  23. #include "ResizableWndState.h"
  24. #include "ResizableLayout.h"
  25. /////////////////////////////////////////////////////////////////////////////
  26. // CResizableMDIFrame frame
  27. class CResizableMDIFrame : public CMDIFrameWnd, public CResizableMinMax,
  28. public CResizableWndState, public CResizableLayout
  29. {
  30. DECLARE_DYNCREATE(CResizableMDIFrame)
  31. protected:
  32. CResizableMDIFrame(); // protected constructor used by dynamic creation
  33. // Attributes
  34. protected:
  35. // Operations
  36. public:
  37. // Overrides
  38. // ClassWizard generated virtual function overrides
  39. //{{AFX_VIRTUAL(CResizableMDIFrame)
  40. protected:
  41. virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
  42. //}}AFX_VIRTUAL
  43. // Implementation
  44. protected:
  45. virtual ~CResizableMDIFrame();
  46. BOOL EnableSaveRestore(LPCTSTR pszSection, BOOL bRectOnly = FALSE);
  47. virtual CWnd* GetResizableWnd() const
  48. {
  49. // make the layout know its parent window
  50. return CWnd::FromHandle(m_hWnd);
  51. };
  52. private:
  53. // flags
  54. BOOL m_bEnableSaveRestore;
  55. BOOL m_bRectOnly;
  56. // internal status
  57. CString m_sSection; // section name (identifies a parent window)
  58. protected:
  59. // Generated message map functions
  60. //{{AFX_MSG(CResizableMDIFrame)
  61. afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
  62. afx_msg void OnDestroy();
  63. afx_msg BOOL OnNcCreate(LPCREATESTRUCT lpCreateStruct);
  64. afx_msg void OnWindowPosChanging(WINDOWPOS FAR* lpwndpos);
  65. //}}AFX_MSG
  66. DECLARE_MESSAGE_MAP()
  67. };
  68. /////////////////////////////////////////////////////////////////////////////
  69. //{{AFX_INSERT_LOCATION}}
  70. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  71. #endif // !defined(AFX_RESIZABLEMDIFRAME_H__INCLUDED_)