00001 #if !defined(AFX_RESIZABLESHEET_H__INCLUDED_)
00002 #define AFX_RESIZABLESHEET_H__INCLUDED_
00003
00004 #if _MSC_VER > 1000
00005 #pragma once
00006 #endif // _MSC_VER > 1000
00007
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00021
00022 #include "ResizableLayout.h"
00023 #include "ResizableGrip.h"
00024 #include "ResizableMinMax.h"
00025 #include "ResizableState.h"
00026
00028
00029
00030
00031 class CResizableSheet : public CPropertySheet, public CResizableLayout,
00032 public CResizableGrip, public CResizableMinMax,
00033 public CResizableState
00034 {
00035 DECLARE_DYNAMIC(CResizableSheet)
00036
00037
00038 public:
00039 CResizableSheet();
00040 CResizableSheet(UINT nIDCaption, CWnd *pParentWnd = NULL, UINT iSelectPage = 0);
00041 CResizableSheet(LPCTSTR pszCaption, CWnd *pParentWnd = NULL, UINT iSelectPage = 0);
00042
00043
00044 private:
00045
00046 DWORD m_dwGripTempState;
00047
00048
00049 BOOL m_bEnableSaveRestore;
00050 BOOL m_bRectOnly;
00051 BOOL m_bSavePage;
00052
00053
00054 CSize m_sizePageTL, m_sizePageBR;
00055
00056
00057 CString m_sSection;
00058
00059
00060 public:
00061
00062
00063
00064
00065 public:
00066 virtual BOOL OnInitDialog();
00067
00068 protected:
00069
00070
00071 public:
00072 void RefreshLayout();
00073 virtual ~CResizableSheet();
00074
00075
00076 private:
00077 void PresetLayout();
00078 void PrivateConstruct();
00079 void SavePage();
00080 void LoadPage();
00081
00082 BOOL IsWizard() { return (m_psh.dwFlags & PSH_WIZARD); }
00083
00084
00085 protected:
00086
00087 void EnableSaveRestore(LPCTSTR pszSection, BOOL bRectOnly = FALSE,
00088 BOOL bWithPage = FALSE);
00089 int GetMinWidth();
00090
00091
00092 virtual CWnd* GetResizableWnd()
00093 {
00094
00095 return this;
00096 };
00097
00098
00099 protected:
00100 virtual BOOL ArrangeLayoutCallback(LayoutInfo& layout);
00101
00102 afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
00103 afx_msg void OnSize(UINT nType, int cx, int cy);
00104 afx_msg void OnDestroy();
00105 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00106 afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00107
00108 afx_msg BOOL OnPageChanging(NMHDR* pNotifyStruct, LRESULT* pResult);
00109 DECLARE_MESSAGE_MAP()
00110 };
00111
00113
00114 #endif // AFX_RESIZABLESHEET_H__INCLUDED_