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 12namespace NWindows { 13namespace NControl { 14 15INT_PTR APIENTRY ProperyPageProcedure(HWND dialogHWND, UINT message, WPARAM wParam, LPARAM lParam); 16 17class CPropertyPage: public CDialog 18{ 19public: 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) Z7_override; 26 27 virtual bool OnKillActive() { return false; } // false = OK 28 virtual bool OnKillActive2(const PSHNOTIFY *) { return OnKillActive(); } 29 virtual LONG OnSetActive() { return false; } // false = OK 30 virtual LONG OnSetActive2(const PSHNOTIFY *) { return OnSetActive(); } 31 virtual LONG OnApply() { return PSNRET_NOERROR; } 32 virtual LONG OnApply2(const PSHNOTIFY *) { return OnApply(); } 33 virtual void OnNotifyHelp() {} 34 virtual void OnNotifyHelp2(const PSHNOTIFY *) { OnNotifyHelp(); } 35 virtual void OnReset() {} 36 virtual void OnReset2(const PSHNOTIFY *) { OnReset(); } 37}; 38 39struct CPageInfo 40{ 41 CPropertyPage *Page; 42 UString Title; 43 UINT ID; 44}; 45 46INT_PTR MyPropertySheet(const CObjectVector<CPageInfo> &pagesInfo, HWND hwndParent, const UString &title); 47 48}} 49 50#endif 51