diff options
author | George Hazan <ghazan@miranda.im> | 2021-03-29 13:00:45 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-03-29 13:00:45 +0300 |
commit | 4ae0dd19d0b7d4d519aa7591819c828ae94a0571 (patch) | |
tree | 298016f10ae3ae752a1f74e7652a5547033c973d | |
parent | 0eee94c3a780e0e9f87b26145b557a99e84d25e0 (diff) |
UI classes: splitter doesn't reset edit field after Apply
- fixes #2818 (TabSRMM: не хватает ограничителей)
- fixes #2817 (StdMsg: не хватает ограничителей)
-rw-r--r-- | src/mir_core/src/CCtrlSpin.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
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; } |