1 // Windows/Control/PropertyPage.h 2 3 #ifndef __WINDOWS_CONTROL_PROPERTYPAGE_H 4 #define __WINDOWS_CONTROL_PROPERTYPAGE_H 5 6 #include <prsht.h> 7 8 #include "Dialog.h" 9 10 namespace NWindows { 11 namespace NControl { 12 13 INT_PTR APIENTRY ProperyPageProcedure(HWND dialogHWND, UINT message, WPARAM wParam, LPARAM lParam); 14 15 class CPropertyPage: public CDialog 16 { 17 public: CDialog(window)18 CPropertyPage(HWND window = NULL): CDialog(window){}; 19 Changed()20 void Changed() { PropSheet_Changed(GetParent(), (HWND)*this); } UnChanged()21 void UnChanged() { PropSheet_UnChanged(GetParent(), (HWND)*this); } 22 23 virtual bool OnNotify(UINT controlID, LPNMHDR lParam); 24 OnKillActive()25 virtual bool OnKillActive() { return false; } // false = OK OnKillActive(const PSHNOTIFY *)26 virtual bool OnKillActive(const PSHNOTIFY *) { return OnKillActive(); } OnSetActive()27 virtual LONG OnSetActive() { return false; } // false = OK OnSetActive(const PSHNOTIFY *)28 virtual LONG OnSetActive(const PSHNOTIFY *) { return OnSetActive(); } OnApply()29 virtual LONG OnApply() { return PSNRET_NOERROR; } OnApply(const PSHNOTIFY *)30 virtual LONG OnApply(const PSHNOTIFY *) { return OnApply(); } OnNotifyHelp()31 virtual void OnNotifyHelp() {} OnNotifyHelp(const PSHNOTIFY *)32 virtual void OnNotifyHelp(const PSHNOTIFY *) { OnNotifyHelp(); } OnReset()33 virtual void OnReset() {} OnReset(const PSHNOTIFY *)34 virtual void OnReset(const PSHNOTIFY *) { OnReset(); } 35 }; 36 37 struct CPageInfo 38 { 39 CPropertyPage *Page; 40 UString Title; 41 UINT ID; 42 }; 43 44 INT_PTR MyPropertySheet(const CObjectVector<CPageInfo> &pagesInfo, HWND hwndParent, const UString &title); 45 46 }} 47 48 #endif 49