ResizablePage.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. #if !defined(AFX_RESIZABLEPAGE_H__INCLUDED_)
  2. #define AFX_RESIZABLEPAGE_H__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // ResizablePage.h : header file
  7. //
  8. /////////////////////////////////////////////////////////////////////////////
  9. //
  10. // Copyright (C) 2000-2001 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 "ResizableLayout.h"
  22. /////////////////////////////////////////////////////////////////////////////
  23. // CResizablePage window
  24. class CResizablePage : public CPropertyPage, public CResizableLayout
  25. {
  26. DECLARE_DYNCREATE(CResizablePage)
  27. // Construction
  28. public:
  29. CResizablePage();
  30. CResizablePage(UINT nIDTemplate, UINT nIDCaption = 0);
  31. CResizablePage(LPCTSTR lpszTemplateName, UINT nIDCaption = 0);
  32. // Attributes
  33. public:
  34. private:
  35. // internal status
  36. BOOL m_bInitDone; // if all internal vars initialized
  37. // Operations
  38. public:
  39. // Overrides
  40. // ClassWizard generated virtual function overrides
  41. //{{AFX_VIRTUAL(CResizablePage)
  42. //}}AFX_VIRTUAL
  43. // Implementation
  44. public:
  45. virtual ~CResizablePage();
  46. // used internally
  47. private:
  48. void Construct();
  49. // callable from derived classes
  50. protected:
  51. virtual CWnd* GetResizableWnd()
  52. {
  53. // make the layout know its parent window
  54. return this;
  55. };
  56. // Generated message map functions
  57. protected:
  58. //{{AFX_MSG(CResizablePage)
  59. virtual BOOL OnInitDialog();
  60. afx_msg void OnSize(UINT nType, int cx, int cy);
  61. afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  62. //}}AFX_MSG
  63. DECLARE_MESSAGE_MAP()
  64. };
  65. /////////////////////////////////////////////////////////////////////////////
  66. //{{AFX_INSERT_LOCATION}}
  67. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  68. #endif // !defined(AFX_RESIZABLEPAGE_H__INCLUDED_)