From fc662341e6f85da78ada0e443f6116b978f79f22 Mon Sep 17 00:00:00 2001 From: Igor Pavlov <87184205+ip7z@users.noreply.github.com> Date: Tue, 14 May 2024 00:00:00 +0000 Subject: 24.05 --- CPP/Windows/Control/Dialog.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'CPP/Windows/Control/Dialog.h') 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 @@ namespace NWindows { namespace NControl { +#ifndef IDCONTINUE +#define IDCONTINUE 11 +#endif + class CDialog: public CWindow { // Z7_CLASS_NO_COPY(CDialog) @@ -64,14 +68,26 @@ public: return window.GetText(s); } +/* bool SetItemInt(unsigned itemID, UINT value, bool isSigned) { return BOOLToBool(SetDlgItemInt(_window, (int)itemID, value, BoolToBOOL(isSigned))); } +*/ + bool SetItemUInt(unsigned itemID, UINT value) + { return BOOLToBool(SetDlgItemInt(_window, (int)itemID, value, FALSE)); } +/* bool GetItemInt(unsigned itemID, bool isSigned, UINT &value) { BOOL result; value = GetDlgItemInt(_window, (int)itemID, &result, BoolToBOOL(isSigned)); return BOOLToBool(result); } +*/ + bool GetItemUInt(unsigned itemID, UINT &value) + { + BOOL result; + value = GetDlgItemInt(_window, (int)itemID, &result, FALSE); + return BOOLToBool(result); + } HWND GetNextGroupItem(HWND control, bool previous) { return GetNextDlgGroupItem(_window, control, BoolToBOOL(previous)); } @@ -126,6 +142,7 @@ public: virtual bool OnButtonClicked(unsigned buttonID, HWND buttonHWND); virtual void OnOK() {} + virtual void OnContinue() {} virtual void OnCancel() {} virtual void OnClose() {} virtual bool OnNotify(UINT /* controlID */, LPNMHDR /* lParam */) { return false; } @@ -157,6 +174,7 @@ public: bool Create(LPCWSTR templateName, HWND parentWindow); #endif virtual void OnOK() Z7_override { Destroy(); } + virtual void OnContinue() Z7_override { Destroy(); } virtual void OnCancel() Z7_override { Destroy(); } virtual void OnClose() Z7_override { Destroy(); } }; @@ -172,6 +190,7 @@ public: bool End(INT_PTR result) { return BOOLToBool(::EndDialog(_window, result)); } virtual void OnOK() Z7_override { End(IDOK); } + virtual void OnContinue() Z7_override { End(IDCONTINUE); } virtual void OnCancel() Z7_override { End(IDCANCEL); } virtual void OnClose() Z7_override { End(IDCLOSE); } }; -- cgit v1.2.3-55-g6feb