ResizablePageEx.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. #if !defined(AFX_RESIZABLEPAGEEX_H__INCLUDED_)
  2. #define AFX_RESIZABLEPAGEEX_H__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // ResizablePageEx.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. // CResizablePageEx window
  24. class CResizablePageEx : public CPropertyPageEx, public CResizableLayout
  25. {
  26. DECLARE_DYNCREATE(CResizablePageEx)
  27. // Construction
  28. public:
  29. CResizablePageEx();
  30. CResizablePageEx(UINT nIDTemplate, UINT nIDCaption = 0, UINT nIDHeaderTitle = 0, UINT nIDHeaderSubTitle = 0);
  31. CResizablePageEx(LPCTSTR lpszTemplateName, UINT nIDCaption = 0, UINT nIDHeaderTitle = 0, UINT nIDHeaderSubTitle = 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(CResizablePageEx)
  42. //}}AFX_VIRTUAL
  43. // Implementation
  44. public:
  45. virtual ~CResizablePageEx();
  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. virtual BOOL NeedsRefresh(HWND hWnd);
  59. //{{AFX_MSG(CResizablePageEx)
  60. virtual BOOL OnInitDialog();
  61. afx_msg void OnSize(UINT nType, int cx, int cy);
  62. afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  63. //}}AFX_MSG
  64. DECLARE_MESSAGE_MAP()
  65. };
  66. /////////////////////////////////////////////////////////////////////////////
  67. //{{AFX_INSERT_LOCATION}}
  68. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  69. #endif // !defined(AFX_RESIZABLEPAGEEX_H__INCLUDED_)