Splash dialog and main window handle dpi change notifications.

This commit is contained in:
Bart House
2018-12-02 18:09:34 -08:00
parent 796bdce828
commit f3dcdc7fda
7 changed files with 134 additions and 85 deletions

View File

@@ -576,6 +576,13 @@ MapWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
dirty(data, data->xCur, data->yCur);
break;
case WM_DPICHANGED: {
RECT rt;
GetWindowRect(hWnd, &rt);
ScreenToClient(GetNHApp()->hMainWnd, (LPPOINT)&rt);
ScreenToClient(GetNHApp()->hMainWnd, ((LPPOINT)&rt) + 1);
mswin_update_window_placement(NHW_MAP, &rt);
} break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);