Scaling in MM_ISOTROPIC map mode

  • Thread starter Thread starter Zi Wang
  • Start date Start date
Z

Zi Wang

Guest
I have an ancient MFC application written in Visual Studio 2005.

It works well on Windows XP until I tried recently to migrate to Windows 7 and Windows 10.

The problem is basically in the MM_ISOTROPIC map mode, different versions of Windows would give different ratios between GetWindowExt and GetViewportExt. So I need to do SetWindowExt manually in Windows 7 and Windows 10 for the application to scale properly.

But a new problem arose since I was doing SetWindowExt manually: Windows XP gives different ratios of window extent and viewport extent on different monitors (presumably based on their size?) so the fonts are larger on bigger monitors. This automatic scaling on Windows XP works very well so I would like to replicate the same behaviour on Windows 7 and Windows 10. However because the default window extent is useless (the fonts would either be too small or gigantic) I don't know how this monitor dependent ratio is calculated on Windows XP?

Continue reading...
 
Back
Top