ResizableMDIChild.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. #if !defined(AFX_RESIZABLEMDICHILD_H__INCLUDED_)
  2. #define AFX_RESIZABLEMDICHILD_H__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // ResizableMDIChild.h : header file
  7. //
  8. /////////////////////////////////////////////////////////////////////////////
  9. //
  10. // This file is part of ResizableLib
  11. // https://github.com/ppescher/resizablelib
  12. //
  13. // Copyright (C) 2000-2015 by Paolo Messina
  14. // mailto:ppescher@hotmail.com
  15. //
  16. // The contents of this file are subject to the Artistic License 2.0
  17. // http://opensource.org/licenses/Artistic-2.0
  18. //
  19. // If you find this code useful, credits would be nice!
  20. //
  21. /////////////////////////////////////////////////////////////////////////////
  22. #include "ResizableMinMax.h"
  23. #include "ResizableWndState.h"
  24. #include "ResizableLayout.h"
  25. /////////////////////////////////////////////////////////////////////////////
  26. // CResizableMDIChild frame
  27. class CResizableMDIChild : public CMDIChildWnd, public CResizableMinMax,
  28. public CResizableWndState, public CResizableLayout
  29. {
  30. DECLARE_DYNCREATE(CResizableMDIChild)
  31. protected:
  32. CResizableMDIChild(); // protected constructor used by dynamic creation
  33. // Attributes
  34. public:
  35. // Operations
  36. public:
  37. // Overrides
  38. // ClassWizard generated virtual function overrides
  39. //{{AFX_VIRTUAL(CResizableMDIChild)
  40. protected:
  41. virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
  42. //}}AFX_VIRTUAL
  43. // Implementation
  44. protected:
  45. virtual ~CResizableMDIChild();
  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(CResizableMDIChild)
  61. afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
  62. afx_msg void OnSize(UINT nType, int cx, int cy);
  63. afx_msg void OnDestroy();
  64. afx_msg BOOL OnNcCreate(LPCREATESTRUCT lpCreateStruct);
  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_RESIZABLEMDICHILD_H__INCLUDED_)