aboutsummaryrefslogtreecommitdiff
path: root/RadTerminalFrame.cpp
diff options
context:
space:
mode:
authorRadAd <adamgates84+github@gmail.com>2021-07-07 11:11:06 +1000
committerRadAd <adamgates84+github@gmail.com>2021-07-07 11:11:06 +1000
commit908d7f31672254f1f761a763f61443e1c657403b (patch)
tree38361e7a3620d14c5aae149796ba5742d0b50181 /RadTerminalFrame.cpp
parent9c3c1b92c06fedd9a9d36ee2d245e5087badd27f (diff)
downloadRadTerminal-908d7f31672254f1f761a763f61443e1c657403b.tar.gz
RadTerminal-908d7f31672254f1f761a763f61443e1c657403b.zip
Fix for dpi change
Diffstat (limited to 'RadTerminalFrame.cpp')
-rw-r--r--RadTerminalFrame.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/RadTerminalFrame.cpp b/RadTerminalFrame.cpp
index 9d6ac01..b6c8cd5 100644
--- a/RadTerminalFrame.cpp
+++ b/RadTerminalFrame.cpp
@@ -44,6 +44,18 @@ HWND CreateRadTerminalFrame(HINSTANCE hInstance)
inline LRESULT MyDefFrameWindowProc(_In_ HWND hWnd, _In_ UINT Msg, _In_ WPARAM wParam, _In_ LPARAM lParam)
{
+ if (Msg == WM_DPICHANGED)
+ {
+ RECT* const prcNewWindow = (RECT*) lParam;
+ SetWindowPos(hWnd,
+ NULL,
+ prcNewWindow->left,
+ prcNewWindow->top,
+ prcNewWindow->right - prcNewWindow->left,
+ prcNewWindow->bottom - prcNewWindow->top,
+ SWP_NOZORDER | SWP_NOACTIVATE);
+ }
+
return DefFrameProc(hWnd, GetMDIClient(hWnd), Msg, wParam, lParam);
}