7zip/CPP/Windows/Control/PropertyPage.h

51 lines
1.4 KiB
C
Raw Permalink Normal View History

2021-12-27 01:00:00 +01:00
// Windows/Control/PropertyPage.h
2023-06-21 02:00:00 +02:00
#ifndef ZIP7_INC_WINDOWS_CONTROL_PROPERTYPAGE_H
#define ZIP7_INC_WINDOWS_CONTROL_PROPERTYPAGE_H
2021-12-27 01:00:00 +01:00
#include "../../Common/MyWindows.h"
2023-06-21 02:00:00 +02:00
#include <prsht.h>
2021-12-27 01:00:00 +01:00
#include "Dialog.h"
namespace NWindows {
namespace NControl {
INT_PTR APIENTRY ProperyPageProcedure(HWND dialogHWND, UINT message, WPARAM wParam, LPARAM lParam);
class CPropertyPage: public CDialog
{
public:
2023-06-21 02:00:00 +02:00
CPropertyPage(HWND window = NULL): CDialog(window) {}
2021-12-27 01:00:00 +01:00
void Changed() { PropSheet_Changed(GetParent(), (HWND)*this); }
void UnChanged() { PropSheet_UnChanged(GetParent(), (HWND)*this); }
2023-06-21 02:00:00 +02:00
virtual bool OnNotify(UINT controlID, LPNMHDR lParam) Z7_override;
2021-12-27 01:00:00 +01:00
virtual bool OnKillActive() { return false; } // false = OK
2023-06-21 02:00:00 +02:00
virtual bool OnKillActive2(const PSHNOTIFY *) { return OnKillActive(); }
2021-12-27 01:00:00 +01:00
virtual LONG OnSetActive() { return false; } // false = OK
2023-06-21 02:00:00 +02:00
virtual LONG OnSetActive2(const PSHNOTIFY *) { return OnSetActive(); }
2021-12-27 01:00:00 +01:00
virtual LONG OnApply() { return PSNRET_NOERROR; }
2023-06-21 02:00:00 +02:00
virtual LONG OnApply2(const PSHNOTIFY *) { return OnApply(); }
2021-12-27 01:00:00 +01:00
virtual void OnNotifyHelp() {}
2023-06-21 02:00:00 +02:00
virtual void OnNotifyHelp2(const PSHNOTIFY *) { OnNotifyHelp(); }
2021-12-27 01:00:00 +01:00
virtual void OnReset() {}
2023-06-21 02:00:00 +02:00
virtual void OnReset2(const PSHNOTIFY *) { OnReset(); }
2021-12-27 01:00:00 +01:00
};
struct CPageInfo
{
CPropertyPage *Page;
UString Title;
UINT ID;
};
INT_PTR MyPropertySheet(const CObjectVector<CPageInfo> &pagesInfo, HWND hwndParent, const UString &title);
}}
#endif