diff options
Diffstat (limited to '')
-rw-r--r-- | CPP/Windows/Control/Dialog.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/CPP/Windows/Control/Dialog.h b/CPP/Windows/Control/Dialog.h index 06be4bf..2510c8f 100644 --- a/CPP/Windows/Control/Dialog.h +++ b/CPP/Windows/Control/Dialog.h | |||
@@ -8,6 +8,10 @@ | |||
8 | namespace NWindows { | 8 | namespace NWindows { |
9 | namespace NControl { | 9 | namespace NControl { |
10 | 10 | ||
11 | #ifndef IDCONTINUE | ||
12 | #define IDCONTINUE 11 | ||
13 | #endif | ||
14 | |||
11 | class CDialog: public CWindow | 15 | class CDialog: public CWindow |
12 | { | 16 | { |
13 | // Z7_CLASS_NO_COPY(CDialog) | 17 | // Z7_CLASS_NO_COPY(CDialog) |
@@ -64,14 +68,26 @@ public: | |||
64 | return window.GetText(s); | 68 | return window.GetText(s); |
65 | } | 69 | } |
66 | 70 | ||
71 | /* | ||
67 | bool SetItemInt(unsigned itemID, UINT value, bool isSigned) | 72 | bool SetItemInt(unsigned itemID, UINT value, bool isSigned) |
68 | { return BOOLToBool(SetDlgItemInt(_window, (int)itemID, value, BoolToBOOL(isSigned))); } | 73 | { return BOOLToBool(SetDlgItemInt(_window, (int)itemID, value, BoolToBOOL(isSigned))); } |
74 | */ | ||
75 | bool SetItemUInt(unsigned itemID, UINT value) | ||
76 | { return BOOLToBool(SetDlgItemInt(_window, (int)itemID, value, FALSE)); } | ||
77 | /* | ||
69 | bool GetItemInt(unsigned itemID, bool isSigned, UINT &value) | 78 | bool GetItemInt(unsigned itemID, bool isSigned, UINT &value) |
70 | { | 79 | { |
71 | BOOL result; | 80 | BOOL result; |
72 | value = GetDlgItemInt(_window, (int)itemID, &result, BoolToBOOL(isSigned)); | 81 | value = GetDlgItemInt(_window, (int)itemID, &result, BoolToBOOL(isSigned)); |
73 | return BOOLToBool(result); | 82 | return BOOLToBool(result); |
74 | } | 83 | } |
84 | */ | ||
85 | bool GetItemUInt(unsigned itemID, UINT &value) | ||
86 | { | ||
87 | BOOL result; | ||
88 | value = GetDlgItemInt(_window, (int)itemID, &result, FALSE); | ||
89 | return BOOLToBool(result); | ||
90 | } | ||
75 | 91 | ||
76 | HWND GetNextGroupItem(HWND control, bool previous) | 92 | HWND GetNextGroupItem(HWND control, bool previous) |
77 | { return GetNextDlgGroupItem(_window, control, BoolToBOOL(previous)); } | 93 | { return GetNextDlgGroupItem(_window, control, BoolToBOOL(previous)); } |
@@ -126,6 +142,7 @@ public: | |||
126 | 142 | ||
127 | virtual bool OnButtonClicked(unsigned buttonID, HWND buttonHWND); | 143 | virtual bool OnButtonClicked(unsigned buttonID, HWND buttonHWND); |
128 | virtual void OnOK() {} | 144 | virtual void OnOK() {} |
145 | virtual void OnContinue() {} | ||
129 | virtual void OnCancel() {} | 146 | virtual void OnCancel() {} |
130 | virtual void OnClose() {} | 147 | virtual void OnClose() {} |
131 | virtual bool OnNotify(UINT /* controlID */, LPNMHDR /* lParam */) { return false; } | 148 | virtual bool OnNotify(UINT /* controlID */, LPNMHDR /* lParam */) { return false; } |
@@ -157,6 +174,7 @@ public: | |||
157 | bool Create(LPCWSTR templateName, HWND parentWindow); | 174 | bool Create(LPCWSTR templateName, HWND parentWindow); |
158 | #endif | 175 | #endif |
159 | virtual void OnOK() Z7_override { Destroy(); } | 176 | virtual void OnOK() Z7_override { Destroy(); } |
177 | virtual void OnContinue() Z7_override { Destroy(); } | ||
160 | virtual void OnCancel() Z7_override { Destroy(); } | 178 | virtual void OnCancel() Z7_override { Destroy(); } |
161 | virtual void OnClose() Z7_override { Destroy(); } | 179 | virtual void OnClose() Z7_override { Destroy(); } |
162 | }; | 180 | }; |
@@ -172,6 +190,7 @@ public: | |||
172 | 190 | ||
173 | bool End(INT_PTR result) { return BOOLToBool(::EndDialog(_window, result)); } | 191 | bool End(INT_PTR result) { return BOOLToBool(::EndDialog(_window, result)); } |
174 | virtual void OnOK() Z7_override { End(IDOK); } | 192 | virtual void OnOK() Z7_override { End(IDOK); } |
193 | virtual void OnContinue() Z7_override { End(IDCONTINUE); } | ||
175 | virtual void OnCancel() Z7_override { End(IDCANCEL); } | 194 | virtual void OnCancel() Z7_override { End(IDCANCEL); } |
176 | virtual void OnClose() Z7_override { End(IDCLOSE); } | 195 | virtual void OnClose() Z7_override { End(IDCLOSE); } |
177 | }; | 196 | }; |