diff --git a/Project/BCB/GUI/MediaInfo_GUI.cbproj b/Project/BCB/GUI/MediaInfo_GUI.cbproj index 0e997dc6a..9fefe9ec8 100644 --- a/Project/BCB/GUI/MediaInfo_GUI.cbproj +++ b/Project/BCB/GUI/MediaInfo_GUI.cbproj @@ -111,6 +111,7 @@ $(BDS)\bin\default_app.manifest PerMonitorV2 ..\..\..\Source\Resource\Image\MediaInfo.ico + user32.dll;$(ILINK_DelayLoadDll) diff --git a/Source/GUI/VCL/GUI_Main.cpp b/Source/GUI/VCL/GUI_Main.cpp index 1e5ad840e..3e4eacc19 100644 --- a/Source/GUI/VCL/GUI_Main.cpp +++ b/Source/GUI/VCL/GUI_Main.cpp @@ -248,8 +248,8 @@ void __fastcall TMainF::GUI_Configure() osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&osvi); int DPI; - if (osvi.dwMajorVersion >= 10 && (osvi.dwMajorVersion > 10 || osvi.dwMinorVersion > 0 || osvi.dwBuildNumber >= 17134)) - DPI=GetDeviceCaps(GetDC(NULL), LOGPIXELSX); // GetSystemDpiForProcess(GetCurrentProcess()); + if (osvi.dwMajorVersion >= 10 && (osvi.dwMajorVersion > 10 || osvi.dwMinorVersion > 0 || osvi.dwBuildNumber >= 14939)) + DPI=GetDpiForWindow(WindowHandle); else DPI=GetDeviceCaps(GetDC(NULL), LOGPIXELSX); float DPIScale=static_cast(DPI)/96;