diff options
Diffstat (limited to 'win32/makedrop/settingspage.h')
-rw-r--r-- | win32/makedrop/settingspage.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/win32/makedrop/settingspage.h b/win32/makedrop/settingspage.h new file mode 100644 index 0000000..f122963 --- /dev/null +++ b/win32/makedrop/settingspage.h @@ -0,0 +1,65 @@ +/* + * AUTHOR + * N. Nielsen + * + * LICENSE + * This software is in the public domain. + * + * The software is provided "as is", without warranty of any kind, + * express or implied, including but not limited to the warranties + * of merchantability, fitness for a particular purpose, and + * noninfringement. In no event shall the author(s) be liable for any + * claim, damages, or other liability, whether in an action of + * contract, tort, or otherwise, arising from, out of, or in connection + * with the software or the use or other dealings in the software. + * + * SUPPORT + * Send bug reports to: <nielsen@memberwebs.com> + */ + +#ifndef __SETTINGSPAGE_H_ +#define __SETTINGSPAGE_H_ + +#include "resource.h" // main symbols +#include <atlhost.h> +#include "common/droplet.h" + +// SettingsPage: ---------------------------------------------------------- +// Property page for misc drop settings + +class SettingsPage : + public CPropertyPage +{ +public: + SettingsPage(Droplet& droplet); + + BEGIN_MSG_MAP(SettingsPage) + MESSAGE_HANDLER(WM_INITDIALOG, onInitDialog) + MESSAGE_HANDLER(PSM_QUERYSIBLINGS, onQuerySiblings) + COMMAND_CODE_HANDLER(BN_CLICKED, onChange) + COMMAND_CODE_HANDLER(EN_CHANGE, onChange) + NOTIFY_CODE_HANDLER(PSN_APPLY, onApply) + END_MSG_MAP() + +// Message Handlers +protected: + LRESULT onInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT onQuerySiblings(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT onApply(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + LRESULT onChange(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); + +// Helper Functions +protected: + // Updates all status etc... + void updateControls(); + + // Load data from droplet to page + void loadData(); + +// Data +protected: + Droplet& m_droplet; // The Property sheet's internal droplet + bool m_inited; // Have we been initialized (used by onChange) +}; + +#endif //__SETTINGSPAGE_H_ |