diff options
author | Igor Pavlov <87184205+ip7z@users.noreply.github.com> | 2021-12-27 00:00:00 +0000 |
---|---|---|
committer | Igor Pavlov <87184205+ip7z@users.noreply.github.com> | 2022-03-18 15:35:13 +0500 |
commit | f19f813537c7aea1c20749c914e756b54a9c3cf5 (patch) | |
tree | 816ba62ca7c0fa19f2eb46d9e9d6f7dd7c3a744d /CPP/Windows/Control/PropertyPage.h | |
parent | 98e06a519b63b81986abe76d28887f6984a7732b (diff) | |
download | 7zip-21.07.tar.gz 7zip-21.07.tar.bz2 7zip-21.07.zip |
'21.07'21.07
Diffstat (limited to 'CPP/Windows/Control/PropertyPage.h')
-rw-r--r-- | CPP/Windows/Control/PropertyPage.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/CPP/Windows/Control/PropertyPage.h b/CPP/Windows/Control/PropertyPage.h new file mode 100644 index 0000000..b68fd8f --- /dev/null +++ b/CPP/Windows/Control/PropertyPage.h | |||
@@ -0,0 +1,50 @@ | |||
1 | // Windows/Control/PropertyPage.h | ||
2 | |||
3 | #ifndef __WINDOWS_CONTROL_PROPERTYPAGE_H | ||
4 | #define __WINDOWS_CONTROL_PROPERTYPAGE_H | ||
5 | |||
6 | #include "../../Common/MyWindows.h" | ||
7 | |||
8 | #include <PrSht.h> | ||
9 | |||
10 | #include "Dialog.h" | ||
11 | |||
12 | namespace NWindows { | ||
13 | namespace NControl { | ||
14 | |||
15 | INT_PTR APIENTRY ProperyPageProcedure(HWND dialogHWND, UINT message, WPARAM wParam, LPARAM lParam); | ||
16 | |||
17 | class CPropertyPage: public CDialog | ||
18 | { | ||
19 | public: | ||
20 | CPropertyPage(HWND window = NULL): CDialog(window){}; | ||
21 | |||
22 | void Changed() { PropSheet_Changed(GetParent(), (HWND)*this); } | ||
23 | void UnChanged() { PropSheet_UnChanged(GetParent(), (HWND)*this); } | ||
24 | |||
25 | virtual bool OnNotify(UINT controlID, LPNMHDR lParam); | ||
26 | |||
27 | virtual bool OnKillActive() { return false; } // false = OK | ||
28 | virtual bool OnKillActive(const PSHNOTIFY *) { return OnKillActive(); } | ||
29 | virtual LONG OnSetActive() { return false; } // false = OK | ||
30 | virtual LONG OnSetActive(const PSHNOTIFY *) { return OnSetActive(); } | ||
31 | virtual LONG OnApply() { return PSNRET_NOERROR; } | ||
32 | virtual LONG OnApply(const PSHNOTIFY *) { return OnApply(); } | ||
33 | virtual void OnNotifyHelp() {} | ||
34 | virtual void OnNotifyHelp(const PSHNOTIFY *) { OnNotifyHelp(); } | ||
35 | virtual void OnReset() {} | ||
36 | virtual void OnReset(const PSHNOTIFY *) { OnReset(); } | ||
37 | }; | ||
38 | |||
39 | struct CPageInfo | ||
40 | { | ||
41 | CPropertyPage *Page; | ||
42 | UString Title; | ||
43 | UINT ID; | ||
44 | }; | ||
45 | |||
46 | INT_PTR MyPropertySheet(const CObjectVector<CPageInfo> &pagesInfo, HWND hwndParent, const UString &title); | ||
47 | |||
48 | }} | ||
49 | |||
50 | #endif | ||