1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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_
|