From e2af50ed3ecbc29c56a211411bcbb666031080ff Mon Sep 17 00:00:00 2001 From: RadAd Date: Wed, 7 Jul 2021 10:18:08 +1000 Subject: Added support for per monitor dpi --- RadTerminalFrame.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'RadTerminalFrame.cpp') diff --git a/RadTerminalFrame.cpp b/RadTerminalFrame.cpp index eed6274..9d6ac01 100644 --- a/RadTerminalFrame.cpp +++ b/RadTerminalFrame.cpp @@ -136,9 +136,10 @@ void RadTerminalFrameOnSizing(HWND hWnd, UINT edge, LPRECT prRect) HWND hActive = GetMDIActive(hWndMDIClient, &bMaximized); if (hActive != NULL && bMaximized) { + const UINT dpi = GetDpiForWindow(hWnd); FORWARD_WM_SIZING(hActive, edge, prRect, SendMessage); - UnadjustWindowRectEx(prRect, GetWindowStyle(hActive), GetMenu(hActive) != NULL, GetWindowExStyle(hActive)); - AdjustWindowRectEx(prRect, GetWindowStyle(hWnd), GetMenu(hWnd) != NULL, GetWindowExStyle(hWnd)); + UnadjustWindowRectExForDpi(prRect, GetWindowStyle(hActive), GetMenu(hActive) != NULL, GetWindowExStyle(hActive), dpi); + AdjustWindowRectExForDpi(prRect, GetWindowStyle(hWnd), GetMenu(hWnd) != NULL, GetWindowExStyle(hWnd), dpi); } } -- cgit v1.2.3