1 #if !defined(AFX_RESIZABLESHEET_H__INCLUDED_)
2 #define AFX_RESIZABLESHEET_H__INCLUDED_
6 #endif // _MSC_VER > 1000
8 /////////////////////////////////////////////////////////////////////////////
10 // Copyright (C) 2000-2002 by Paolo Messina
11 // (http://www.geocities.com/ppescher - ppescher@yahoo.com)
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
18 // If you find this code useful, credits would be nice!
20 /////////////////////////////////////////////////////////////////////////////
22 #include "ResizableLayout.h"
23 #include "ResizableGrip.h"
24 #include "ResizableMinMax.h"
25 #include "ResizableState.h"
27 /////////////////////////////////////////////////////////////////////////////
28 // ResizableSheet.h : header file
31 class CResizableSheet
: public CPropertySheet
, public CResizableLayout
,
32 public CResizableGrip
, public CResizableMinMax
,
33 public CResizableState
35 DECLARE_DYNAMIC(CResizableSheet
)
40 CResizableSheet(UINT nIDCaption
, CWnd
*pParentWnd
= NULL
, UINT iSelectPage
= 0);
41 CResizableSheet(LPCTSTR pszCaption
, CWnd
*pParentWnd
= NULL
, UINT iSelectPage
= 0);
45 // support for temporarily hiding the grip
46 DWORD m_dwGripTempState
;
49 BOOL m_bEnableSaveRestore
;
54 CSize m_sizePageTL
, m_sizePageBR
;
57 CString m_sSection
; // section name (identifies a parent window)
63 // ClassWizard generated virtual function overrides
64 //{{AFX_VIRTUAL(CResizableSheet)
66 virtual BOOL
OnInitDialog();
73 virtual ~CResizableSheet();
78 void PrivateConstruct();
82 BOOL
IsWizard() { return (m_psh
.dwFlags
& PSH_WIZARD
); }
84 // callable from derived classes
86 // section to use in app's profile
87 void EnableSaveRestore(LPCTSTR pszSection
, BOOL bRectOnly
= FALSE
,
88 BOOL bWithPage
= FALSE
);
89 int GetMinWidth(); // minimum width to display all buttons
92 virtual CWnd
* GetResizableWnd()
94 // make the layout know its parent window
98 // Generated message map functions
100 virtual BOOL
ArrangeLayoutCallback(LayoutInfo
& layout
);
101 //{{AFX_MSG(CResizableSheet)
102 afx_msg
void OnGetMinMaxInfo(MINMAXINFO FAR
* lpMMI
);
103 afx_msg
void OnSize(UINT nType
, int cx
, int cy
);
104 afx_msg
void OnDestroy();
105 afx_msg
int OnCreate(LPCREATESTRUCT lpCreateStruct
);
106 afx_msg BOOL
OnEraseBkgnd(CDC
* pDC
);
108 afx_msg BOOL
OnPageChanging(NMHDR
* pNotifyStruct
, LRESULT
* pResult
);
109 DECLARE_MESSAGE_MAP()
112 /////////////////////////////////////////////////////////////////////////////
114 #endif // AFX_RESIZABLESHEET_H__INCLUDED_