1 // Windows/Control/PropertyPage.h 2 3 #ifndef ZIP7_INC_WINDOWS_CONTROL_PROPERTYPAGE_H 4 #define ZIP7_INC_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: CDialog(window)20 CPropertyPage(HWND window = NULL): CDialog(window) {} 21 Changed()22 void Changed() { PropSheet_Changed(GetParent(), (HWND)*this); } UnChanged()23 void UnChanged() { PropSheet_UnChanged(GetParent(), (HWND)*this); } 24 25 virtual bool OnNotify(UINT controlID, LPNMHDR lParam) Z7_override; 26 OnKillActive()27 virtual bool OnKillActive() { return false; } // false = OK OnKillActive2(const PSHNOTIFY *)28 virtual bool OnKillActive2(const PSHNOTIFY *) { return OnKillActive(); } OnSetActive()29 virtual LONG OnSetActive() { return false; } // false = OK OnSetActive2(const PSHNOTIFY *)30 virtual LONG OnSetActive2(const PSHNOTIFY *) { return OnSetActive(); } OnApply()31 virtual LONG OnApply() { return PSNRET_NOERROR; } OnApply2(const PSHNOTIFY *)32 virtual LONG OnApply2(const PSHNOTIFY *) { return OnApply(); } OnNotifyHelp()33 virtual void OnNotifyHelp() {} OnNotifyHelp2(const PSHNOTIFY *)34 virtual void OnNotifyHelp2(const PSHNOTIFY *) { OnNotifyHelp(); } OnReset()35 virtual void OnReset() {} OnReset2(const PSHNOTIFY *)36 virtual void OnReset2(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 51