diff options
author | George Hazan <ghazan@miranda.im> | 2020-04-26 20:42:06 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-04-26 20:42:12 +0300 |
commit | f5c38382ae6c0b9c70dd8859baa68301b76474f1 (patch) | |
tree | cb1f60f3b6e77f5e439c99c4241d30e870958665 /plugins/NewStory/src | |
parent | 4952db253923d309c9a1b5ebe33615bf4f15175c (diff) |
NewStory: correct control resizer
Diffstat (limited to 'plugins/NewStory/src')
-rw-r--r-- | plugins/NewStory/src/history_log.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
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 |