1 #if !defined(AFX_RESIZABLESHEET_H__INCLUDED_)
2 #define AFX_RESIZABLESHEET_H__INCLUDED_
6 #endif // _MSC_VER > 1000
8 /////////////////////////////////////////////////////////////////////////////
10 // Copyright (C) 2000 by Paolo Messina
11 // (ppescher@yahoo.com)
13 // Free for non-commercial use.
14 // You may change the code to your needs,
15 // provided that credits to the original
16 // author is given in the modified files.
18 /////////////////////////////////////////////////////////////////////////////
19 // ResizableSheet.h : header file
22 class CResizableSheet
: public CPropertySheet
24 DECLARE_DYNAMIC(CResizableSheet
)
29 CResizableSheet(UINT nIDCaption
, CWnd
*pParentWnd
= NULL
, UINT iSelectPage
= 0);
30 CResizableSheet(LPCTSTR pszCaption
, CWnd
*pParentWnd
= NULL
, UINT iSelectPage
= 0);
35 BOOL m_bEnableSaveRestore
;
39 CString m_sSection
; // section name and
40 CString m_sEntry
; // entry for save/restore
42 BOOL m_bInitDone
; // if all internal vars initialized
46 SIZE m_szLayoutTabLine
; // tab control or wizard line
47 SIZE m_szLayoutButton
[7]; // each index corresponds to a possible button
53 // ClassWizard generated virtual function overrides
54 //{{AFX_VIRTUAL(CResizableSheet)
56 virtual BOOL
OnInitDialog();
62 virtual ~CResizableSheet();
68 void LoadWindowRect();
69 void SaveWindowRect();
72 // callable from derived classes
74 void SetMaximizedRect(const CRect
& rc
); // set window rect when maximized
75 void ResetMaximizedRect(); // reset to default maximized rect
76 void EnableSaveRestore(LPCTSTR pszSection
,
77 LPCTSTR pszEntry
, BOOL bWithPage
= FALSE
); // section and entry in app's profile
78 int GetMinWidth(); // minimum width to display all buttons
81 // Generated message map functions
83 //{{AFX_MSG(CResizableSheet)
84 afx_msg
void OnSize(UINT nType
, int cx
, int cy
);
85 afx_msg
void OnDestroy();
86 afx_msg
int OnCreate(LPCREATESTRUCT lpCreateStruct
);
88 afx_msg
void OnPageChanged();
92 /////////////////////////////////////////////////////////////////////////////
94 #endif // AFX_RESIZABLESHEET_H__INCLUDED_