Andrew Truckle
Andrew Truckle

Reputation: 19157

Menu being cropped

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

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.

Please advise.

Thanks. Menu

Upvotes: 2

Views: 111

Answers (1)

Barmak Shemirani
Barmak Shemirani

Reputation: 31609

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

Click "Project Properties" -> "Manifest Tools" -> "DPI Awareness"

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

enter image description here


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>

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.

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

See also
Creating a DPI-Aware Application
High DPI Reference

Upvotes: 3

Related Questions