ResizableFrame.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #if !defined(AFX_RESIZABLEFRAME_H__4BA07057_6EF3_43A4_A80B_A24FA3A8B5C7__INCLUDED_)
  2. #define AFX_RESIZABLEFRAME_H__4BA07057_6EF3_43A4_A80B_A24FA3A8B5C7__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // ResizableFrame.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. // CResizableFrame frame
  25. class CResizableFrame : public CFrameWnd, public CResizableMinMax,
  26. public CResizableState
  27. {
  28. DECLARE_DYNCREATE(CResizableFrame)
  29. protected:
  30. CResizableFrame(); // protected constructor used by dynamic creation
  31. // Attributes
  32. protected:
  33. // Operations
  34. public:
  35. // Overrides
  36. // ClassWizard generated virtual function overrides
  37. //{{AFX_VIRTUAL(CResizableFrame)
  38. //}}AFX_VIRTUAL
  39. // Implementation
  40. protected:
  41. virtual ~CResizableFrame();
  42. BOOL EnableSaveRestore(LPCTSTR pszSection, BOOL bRectOnly = FALSE);
  43. virtual CWnd* GetResizableWnd()
  44. {
  45. // make the layout know its parent window
  46. return this;
  47. };
  48. private:
  49. // flags
  50. BOOL m_bEnableSaveRestore;
  51. BOOL m_bRectOnly;
  52. // internal status
  53. CString m_sSection; // section name (identifies a parent window)
  54. protected:
  55. // Generated message map functions
  56. //{{AFX_MSG(CResizableFrame)
  57. afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
  58. afx_msg void OnDestroy();
  59. //}}AFX_MSG
  60. DECLARE_MESSAGE_MAP()
  61. };
  62. /////////////////////////////////////////////////////////////////////////////
  63. //{{AFX_INSERT_LOCATION}}
  64. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  65. #endif // !defined(AFX_RESIZABLEFRAME_H__4BA07057_6EF3_43A4_A80B_A24FA3A8B5C7__INCLUDED_)