Support unrar64.dll
[xy_vsfilter.git] / src / ui / ResizableLib / ResizableSheet.h
blobc82a63798fbeca3f72e2d60d5bf92bba0b280282
1 #if !defined(AFX_RESIZABLESHEET_H__INCLUDED_)
2 #define AFX_RESIZABLESHEET_H__INCLUDED_
4 #if _MSC_VER > 1000
5 #pragma once
6 #endif // _MSC_VER > 1000
8 /////////////////////////////////////////////////////////////////////////////
9 //
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)
37 // Construction
38 public:
39 CResizableSheet();
40 CResizableSheet(UINT nIDCaption, CWnd *pParentWnd = NULL, UINT iSelectPage = 0);
41 CResizableSheet(LPCTSTR pszCaption, CWnd *pParentWnd = NULL, UINT iSelectPage = 0);
43 // Attributes
44 private:
45 // support for temporarily hiding the grip
46 DWORD m_dwGripTempState;
48 // flags
49 BOOL m_bEnableSaveRestore;
50 BOOL m_bRectOnly;
51 BOOL m_bSavePage;
53 // layout vars
54 CSize m_sizePageTL, m_sizePageBR;
56 // internal status
57 CString m_sSection; // section name (identifies a parent window)
59 // Operations
60 public:
62 // Overrides
63 // ClassWizard generated virtual function overrides
64 //{{AFX_VIRTUAL(CResizableSheet)
65 public:
66 virtual BOOL OnInitDialog();
67 //}}AFX_VIRTUAL
68 protected:
70 // Implementation
71 public:
72 void RefreshLayout();
73 virtual ~CResizableSheet();
75 // used internally
76 private:
77 void PresetLayout();
78 void PrivateConstruct();
79 void SavePage();
80 void LoadPage();
82 BOOL IsWizard() { return (m_psh.dwFlags & PSH_WIZARD); }
84 // callable from derived classes
85 protected:
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
95 return this;
98 // Generated message map functions
99 protected:
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);
107 //}}AFX_MSG
108 afx_msg BOOL OnPageChanging(NMHDR* pNotifyStruct, LRESULT* pResult);
109 DECLARE_MESSAGE_MAP()
112 /////////////////////////////////////////////////////////////////////////////
114 #endif // AFX_RESIZABLESHEET_H__INCLUDED_