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: 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); 26 OnKillActive()27 virtual bool OnKillActive() { return false; } // false = OK OnKillActive(const PSHNOTIFY *)28 virtual bool OnKillActive(const PSHNOTIFY *) { return OnKillActive(); } OnSetActive()29 virtual LONG OnSetActive() { return false; } // false = OK OnSetActive(const PSHNOTIFY *)30 virtual LONG OnSetActive(const PSHNOTIFY *) { return OnSetActive(); } OnApply()31 virtual LONG OnApply() { return PSNRET_NOERROR; } OnApply(const PSHNOTIFY *)32 virtual LONG OnApply(const PSHNOTIFY *) { return OnApply(); } OnNotifyHelp()33 virtual void OnNotifyHelp() {} OnNotifyHelp(const PSHNOTIFY *)34 virtual void OnNotifyHelp(const PSHNOTIFY *) { OnNotifyHelp(); } OnReset()35 virtual void OnReset() {} OnReset(const PSHNOTIFY *)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 51