diff --git a/src/Win/WinWindow.cpp b/src/Win/WinWindow.cpp index 92c9040..4b67661 100644 --- a/src/Win/WinWindow.cpp +++ b/src/Win/WinWindow.cpp @@ -38,19 +38,6 @@ namespace hgl int win_left, win_top; int win_width, win_height; - - WindowCreateExteraParams createParams; - - { - context = DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2; - previousDpiContext = SetThreadDpiAwarenessContext(context); - - createParams.bEnableNonClientDpiScaling = FALSE; - createParams.bChildWindowDpiIsolation = TRUE; - - previousDpiHostingBehavior = SetThreadDpiHostingBehavior(DPI_HOSTING_BEHAVIOR_MIXED); - } - { RECT win_rect; @@ -89,7 +76,7 @@ namespace hgl nullptr, // handle to parent nullptr, // handle to menu hInstance, // hInstance - &createParams); // extra parameters + nullptr); // extra parameters if (!win_hwnd) { @@ -166,9 +153,6 @@ namespace hgl { ShowWindow(win_hwnd, SW_SHOW); - SetThreadDpiAwarenessContext(previousDpiContext); - SetThreadDpiHostingBehavior(previousDpiHostingBehavior); - SetForegroundWindow(win_hwnd); SetFocus(win_hwnd); diff --git a/src/Win/WinWindow.h b/src/Win/WinWindow.h index fe3f52b..7401847 100644 --- a/src/Win/WinWindow.h +++ b/src/Win/WinWindow.h @@ -3,12 +3,6 @@ #include namespace hgl { - struct WindowCreateExteraParams - { - BOOL bEnableNonClientDpiScaling; - BOOL bChildWindowDpiIsolation; - }; - /** * Windows平台窗口实现 */ @@ -20,12 +14,6 @@ namespace hgl MSG win_msg; - private: - - DPI_AWARENESS_CONTEXT context; - DPI_AWARENESS_CONTEXT previousDpiContext; - DPI_HOSTING_BEHAVIOR previousDpiHostingBehavior; - protected: bool Create();