From cd6548c80e6787e07f84b6159c8201dfcb83a98d Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Sun, 14 Feb 2021 00:13:47 +0100 Subject: [PATCH] Use dedicated helper function to get window client area size --- src/msw/graphicsd2d.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/msw/graphicsd2d.cpp b/src/msw/graphicsd2d.cpp index c6f2dcf02d..40ae046df6 100644 --- a/src/msw/graphicsd2d.cpp +++ b/src/msw/graphicsd2d.cpp @@ -3511,8 +3511,7 @@ public: void Resize() wxOVERRIDE { - RECT clientRect; - GetClientRect(m_hwnd, &clientRect); + RECT clientRect = wxGetClientRect(m_hwnd); D2D1_SIZE_U hwndSize = D2D1::SizeU( clientRect.right - clientRect.left, @@ -3533,8 +3532,7 @@ protected: HRESULT result; - RECT clientRect; - GetClientRect(m_hwnd, &clientRect); + RECT clientRect = wxGetClientRect(m_hwnd); D2D1_SIZE_U size = D2D1::SizeU( clientRect.right - clientRect.left,