设置 DPI 感知的方法有多种。这取决于您如何设置该值。
Click "Project Properties"
-> "Manifest Tools"
-> "DPI Awareness"
可能会说"High DPI Aware"
就你而言,这可以解释问题。将其更改为"Per Monitor High DPI Aware"
Or you can set this value in manifest file, in dpiAware section, in this manifest file the value should be
"True/PM"
instead of
"True"
. The manifest file will be names
"myapp.exe.manifest"
it should be in resource directory.
<dpiAware>True/PM</dpiAware>
在你的情况下,该值可能是"True"
,这可以解释问题。
Or you might be using
SetProcessDpiAwareness https://msdn.microsoft.com/en-us/library/windows/desktop/dn302122(v=vs.85).aspx. In that case it should use the value
PROCESS_PER_MONITOR_DPI_AWARE
.
您也可能正在使用SetProcessDPIAware
!该函数已被弃用。
也可以看看
创建 DPI 感知应用程序 https://msdn.microsoft.com/en-us/library/ms701681(v=vs.85).aspx
高 DPI 参考 https://msdn.microsoft.com/en-us/library/windows/desktop/hh447398(v=vs.85).aspx