ResizableMDIChild.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. #if !defined(AFX_RESIZABLEMDICHILD_H__EA9AE112_0E99_4D6E_B42B_A3BA9DE3756E__INCLUDED_)
  2. #define AFX_RESIZABLEMDICHILD_H__EA9AE112_0E99_4D6E_B42B_A3BA9DE3756E__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // ResizableMDIChild.h : header file
  7. //
  8. /////////////////////////////////////////////////////////////////////////////
  9. //
  10. // Copyright (C) 2000-2002 by Paolo Messina
  11. // (http://www.geocities.com/ppescher - ppescher@yahoo.com)
  12. //
  13. // The contents of this file are subject to the Artistic License (the "License").
  14. // You may not use this file except in compliance with the License.
  15. // You may obtain a copy of the License at:
  16. // http://www.opensource.org/licenses/artistic-license.html
  17. //
  18. // If you find this code useful, credits would be nice!
  19. //
  20. /////////////////////////////////////////////////////////////////////////////
  21. #include "ResizableMinMax.h"
  22. #include "ResizableState.h"
  23. /////////////////////////////////////////////////////////////////////////////
  24. // CResizableMDIChild frame
  25. class CResizableMDIChild : public CMDIChildWnd, public CResizableMinMax,
  26. public CResizableState
  27. {
  28. DECLARE_DYNCREATE(CResizableMDIChild)
  29. protected:
  30. CResizableMDIChild(); // protected constructor used by dynamic creation
  31. // Attributes
  32. public:
  33. // Operations
  34. public:
  35. // Overrides
  36. // ClassWizard generated virtual function overrides
  37. //{{AFX_VIRTUAL(CResizableMDIChild)
  38. protected:
  39. //}}AFX_VIRTUAL
  40. // Implementation
  41. protected:
  42. virtual ~CResizableMDIChild();
  43. BOOL EnableSaveRestore(LPCTSTR pszSection, BOOL bRectOnly = FALSE);
  44. virtual CWnd* GetResizableWnd()
  45. {
  46. // make the layout know its parent window
  47. return this;
  48. };
  49. private:
  50. // flags
  51. BOOL m_bEnableSaveRestore;
  52. BOOL m_bRectOnly;
  53. // internal status
  54. CString m_sSection; // section name (identifies a parent window)
  55. protected:
  56. // Generated message map functions
  57. //{{AFX_MSG(CResizableMDIChild)
  58. afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
  59. afx_msg void OnSize(UINT nType, int cx, int cy);
  60. afx_msg void OnDestroy();
  61. //}}AFX_MSG
  62. DECLARE_MESSAGE_MAP()
  63. };
  64. /////////////////////////////////////////////////////////////////////////////
  65. //{{AFX_INSERT_LOCATION}}
  66. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  67. #endif // !defined(AFX_RESIZABLEMDICHILD_H__EA9AE112_0E99_4D6E_B42B_A3BA9DE3756E__INCLUDED_)