From f5c38382ae6c0b9c70dd8859baa68301b76474f1 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 26 Apr 2020 20:42:06 +0300 Subject: NewStory: correct control resizer --- plugins/NewStory/src/history_log.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'plugins/NewStory/src') diff --git a/plugins/NewStory/src/history_log.cpp b/plugins/NewStory/src/history_log.cpp index 028aeaf819..269d25ea7e 100644 --- a/plugins/NewStory/src/history_log.cpp +++ b/plugins/NewStory/src/history_log.cpp @@ -66,9 +66,12 @@ public: void Resize() override { RECT rc; - GetClientRect(GetDlgItem(m_pDlg.GetHwnd(), IDC_SRMM_LOG), &rc); + GetWindowRect(GetDlgItem(m_pDlg.GetHwnd(), IDC_SRMM_LOG), &rc); - ::SetWindowPos(m_hwnd, 0, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, SWP_NOACTIVATE | SWP_NOZORDER); + POINT pt = { rc.left, rc.top }; + ScreenToClient(GetParent(m_hwnd), &pt); + + ::SetWindowPos(m_hwnd, 0, pt.x, pt.y, rc.right - rc.left, rc.bottom - rc.top, SWP_NOACTIVATE | SWP_NOZORDER); } void ScrollToBottom() override -- cgit v1.2.3