ResizableWndState.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. // This file is part of ResizableLib
  4. // http://sourceforge.net/projects/resizablelib
  5. //
  6. // Copyright (C) 2000-2004 by Paolo Messina
  7. // http://www.geocities.com/ppescher - mailto:ppescher@hotmail.com
  8. //
  9. // The contents of this file are subject to the Artistic License (the "License").
  10. // You may not use this file except in compliance with the License.
  11. // You may obtain a copy of the License at:
  12. // http://www.opensource.org/licenses/artistic-license.html
  13. //
  14. // If you find this code useful, credits would be nice!
  15. //
  16. /////////////////////////////////////////////////////////////////////////////
  17. /*!
  18. * @file
  19. * @brief Interface for the CResizableWndState class.
  20. */
  21. #if !defined(AFX_RESIZABLEWNDSTATE_H__INCLUDED_)
  22. #define AFX_RESIZABLEWNDSTATE_H__INCLUDED_
  23. #if _MSC_VER > 1000
  24. #pragma once
  25. #endif // _MSC_VER > 1000
  26. #include "ResizableState.h"
  27. /*! @addtogroup CoreComponents
  28. * @{
  29. */
  30. //! @brief Persists window position, size and state
  31. /*!
  32. * Derive from this class when you want to persist the size, position and
  33. * minimized/maximized state of top level windows.
  34. * This class is used in the provided resizable counterparts of
  35. * the standard MFC window and dialog classes.
  36. */
  37. class CResizableWndState : public CResizableState
  38. {
  39. protected:
  40. //! @brief Load and set the window position and size
  41. BOOL LoadWindowRect(LPCTSTR pszName, BOOL bRectOnly);
  42. //! @brief Save the current window position and size
  43. BOOL SaveWindowRect(LPCTSTR pszName, BOOL bRectOnly);
  44. //! @brief Override to provide the parent window
  45. virtual CWnd* GetResizableWnd() const = 0;
  46. public:
  47. CResizableWndState();
  48. virtual ~CResizableWndState();
  49. };
  50. // @}
  51. #endif // !defined(AFX_RESIZABLEWNDSTATE_H__INCLUDED_)