Do not show "Open" or "Open with" context menu entries for folders
[TortoiseGit.git] / ext / ResizableLib / ResizableSheetEx.h
blobcbbea0dbdc1dd8c6aab6acb66e27b26e5719e341
1 #if !defined(AFX_RESIZABLESHEETEX_H__INCLUDED_)
2 #define AFX_RESIZABLESHEETEX_H__INCLUDED_
4 #if _MSC_VER > 1000
5 #pragma once
6 #endif // _MSC_VER > 1000
8 /////////////////////////////////////////////////////////////////////////////
9 //
10 // This file is part of ResizableLib
11 // http://sourceforge.net/projects/resizablelib
13 // Copyright (C) 2000-2004 by Paolo Messina
14 // http://www.geocities.com/ppescher - mailto:ppescher@hotmail.com
16 // The contents of this file are subject to the Artistic License (the "License").
17 // You may not use this file except in compliance with the License.
18 // You may obtain a copy of the License at:
19 // http://www.opensource.org/licenses/artistic-license.html
21 // If you find this code useful, credits would be nice!
23 /////////////////////////////////////////////////////////////////////////////
25 #include "ResizableLayout.h"
26 #include "ResizableGrip.h"
27 #include "ResizableMinMax.h"
28 #include "ResizableSheetState.h"
30 /////////////////////////////////////////////////////////////////////////////
31 // ResizableSheetEx.h : header file
34 class CResizableSheetEx : public CPropertySheetEx, public CResizableLayout,
35 public CResizableGrip, public CResizableMinMax,
36 public CResizableSheetState
38 DECLARE_DYNAMIC(CResizableSheetEx)
40 // Construction
41 public:
42 CResizableSheetEx();
43 CResizableSheetEx(UINT nIDCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0,
44 HBITMAP hbmWatermark = NULL, HPALETTE hpalWatermark = NULL, HBITMAP hbmHeader = NULL);
45 CResizableSheetEx(LPCTSTR pszCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0,
46 HBITMAP hbmWatermark = NULL, HPALETTE hpalWatermark = NULL, HBITMAP hbmHeader = NULL);
48 // Attributes
49 private:
50 // support for temporarily hiding the grip
51 DWORD m_dwGripTempState;
53 // flags
54 BOOL m_bEnableSaveRestore;
55 BOOL m_bRectOnly;
56 BOOL m_bSavePage;
58 // layout vars
59 UINT_PTR m_nCallbackID;
60 CSize m_sizePageTL, m_sizePageBR;
61 BOOL m_bLayoutDone;
63 // internal status
64 CString m_sSection; // section name (identifies a parent window)
66 // Operations
67 public:
68 enum
70 PSH_IE4WIZARD97 = 0x00002000,
71 PSH_IE5WIZARD97 = 0x01000000,
74 // Overrides
75 // ClassWizard generated virtual function overrides
76 //{{AFX_VIRTUAL(CResizableSheetEx)
77 public:
78 virtual BOOL OnInitDialog();
79 protected:
80 virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
81 //}}AFX_VIRTUAL
83 // Implementation
84 public:
85 virtual ~CResizableSheetEx();
87 // used internally
88 private:
89 void PrivateConstruct();
91 BOOL IsWizard() const;
92 BOOL IsWizard97() const;
94 // callable from derived classes
95 protected:
96 void RefreshLayout();
97 void PresetLayout();
99 // section to use in app's profile
100 void EnableSaveRestore(LPCTSTR pszSection, BOOL bRectOnly = FALSE,
101 BOOL bWithPage = FALSE);
102 int GetMinWidth(); // minimum width to display all buttons
105 virtual CWnd* GetResizableWnd() const
107 // make the layout know its parent window
108 return CWnd::FromHandle(m_hWnd);
111 // Generated message map functions
112 protected:
113 void GetHeaderRect(LPRECT lpRect);
114 virtual BOOL CalcSizeExtra(HWND hWndChild, CSize sizeChild, CSize& sizeExtra);
115 virtual BOOL ArrangeLayoutCallback(LAYOUTINFO& layout) const;
116 //{{AFX_MSG(CResizableSheetEx)
117 afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
118 afx_msg void OnSize(UINT nType, int cx, int cy);
119 afx_msg void OnDestroy();
120 afx_msg BOOL OnEraseBkgnd(CDC* pDC);
121 afx_msg BOOL OnNcCreate(LPCREATESTRUCT lpCreateStruct);
122 //}}AFX_MSG
123 afx_msg BOOL OnPageChanging(NMHDR* pNotifyStruct, LRESULT* pResult);
124 afx_msg LRESULT OnResizeSupport(WPARAM wParam, LPARAM lParam);
125 DECLARE_MESSAGE_MAP()
128 /////////////////////////////////////////////////////////////////////////////
130 #endif // AFX_RESIZABLESHEETEX_H__INCLUDED_