菜单被裁剪 [英] Menu being cropped

查看:59
本文介绍了菜单被裁剪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I have a MFC project. It supports over 40 languages.

在我的PC上,我有两个监视器.它们都是大小不同的显示器,分辨率也不同.

On my PC I have two monitors. They are both different size monitors and different resolutions.

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

If I move my application onto the smaller monitor the complete language menu does not display. I understood it would show scroll bars. Why isn't it?

我的菜单是标准菜单.没什么.

My menu is a standard menu. Nothing fancy.

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

My main monitor has higher resolution and I can see full menu.

请告知.

谢谢.

推荐答案

设置DPI感知度有多种方法.这取决于您如何设置此值.

There are different ways to set DPI awareness. It depends how you have set this value.

点击"Project Properties"-> "Manifest Tools"-> "DPI Awareness"

在您的情况下,可能会说"High DPI Aware",这可以解释问题.将其更改为"Per Monitor High DPI Aware"

It might say "High DPI Aware" in your case, that could explain the problem. Change it to "Per Monitor High DPI Aware"


或者,您可以在清单文件的dpiAware部分中设置此值,在此清单文件中,该值应为"True/PM"而不是"True".清单文件的名称为"myapp.exe.manifest",应位于资源目​​录中.


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",这可以解释问题.


或者您可能正在使用 .在这种情况下,应使用值PROCESS_PER_MONITOR_DPI_AWARE.

In your case the value might be "True", that could explain the problem.


Or you might be using SetProcessDpiAwareness. In that case it should use the value PROCESS_PER_MONITOR_DPI_AWARE.

您可能正在使用SetProcessDPIAware!不推荐使用此功能.

It's also possible that you are using SetProcessDPIAware! This function is deprecated.

另请参阅
创建可识别DPI的应用程序
高DPI参考

See also
Creating a DPI-Aware Application
High DPI Reference

这篇关于菜单被裁剪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆