Click here to Skip to main content
15,666,553 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi All,

I am new into MFC and being involved into bug-fixing on a C++ MFC application.
I am facing one issue while solving a bug and that is being explained below:

There is a grid with 3 columns and all 3 columns are visible when am running the application in laptop. But, when am trying to run the application in desktop, the third column is not visible and its getting hidden inside the grid box.

Its a sure case of Auto-Scaling.

What I have tried:

I did some research in the internet and tried adding "ApplyAutoScaling" .NET property. But, its not working.
Updated 20-May-20 0:37am

You should change the settings so there won't be a difference when the program runs on different machines.
Go to the project's properties page, then to Manifest Tool and then Input and Output. Change the DPI awareness to 'none'
Share this answer
I think MFC has implemented something like this in VS 2015. Do a Web search on MFC dynamic dialog. Mind you they are about 25 years behind the concept, but better late than never.

I was using CODE::BLOCKS at one time for cross platform (interface) development and this idea was built in. Well you had to add the region control to the dialog, but I think MFC soled the same idea.

Before I knew Windows exited, I created a windowing library that did this automatically, regardless of graphics mode (graphic, text or resolution).

1. Look if someone has done it already.
2. If not, do it yourself.
Share this answer
Member 11072126 30-Mar-20 0:29am    
Scaling in a good exercise of programming and it is not a difficult task. You have just to look up the right graphic API and perform some multiplications.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900