From 4ae0dd19d0b7d4d519aa7591819c828ae94a0571 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 29 Mar 2021 13:00:45 +0300 Subject: UI classes: splitter doesn't reset edit field after Apply MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - fixes #2818 (TabSRMM: не хватает ограничителей) - fixes #2817 (StdMsg: не хватает ограничителей) --- src/mir_core/src/CCtrlSpin.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mir_core/src/CCtrlSpin.cpp b/src/mir_core/src/CCtrlSpin.cpp index 223a333ae9..9f452d6d6f 100644 --- a/src/mir_core/src/CCtrlSpin.cpp +++ b/src/mir_core/src/CCtrlSpin.cpp @@ -28,7 +28,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. CCtrlSpin::CCtrlSpin(CDlgBase *dlg, int ctrlId, WORD wMax, WORD wMin) : CCtrlData(dlg, ctrlId), m_wMin(wMin), - m_wMax(wMax) + m_wMax(wMax), + m_wCurr(0) {} BOOL CCtrlSpin::OnNotify(int, NMHDR *pnmh) @@ -50,6 +51,14 @@ bool CCtrlSpin::OnApply() m_wCurr = SendMsg(UDM_GETPOS, 0, 0); if (m_dbLink != nullptr) SaveInt(m_wCurr); + + HWND hwndBuddy = (HWND)SendMsg(UDM_GETBUDDY, 0, 0); + if (hwndBuddy) { + wchar_t buf[100]; + _itow(m_wCurr, buf, 10); + ::SendMessage(hwndBuddy, WM_SETTEXT, 0, LPARAM(buf)); + } + return true; } -- cgit v1.2.3