菜单被裁剪

2024-03-07

我有一个MFC项目。它支持 40 多种语言。

我的电脑上有两个显示器。它们都是不同尺寸的显示器和不同的分辨率。

如果我将应用程序移至较小的显示器上,则不会显示完整的语言菜单。我知道它会显示滚动条。为什么不是呢?

我的菜单是标准菜单。没有什么花哨。

我的主显示器具有更高的分辨率,我可以看到完整的菜单。

请指教。

Thanks. Menu


设置 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

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

菜单被裁剪 的相关文章