[英]How to make my application DPI-aware?
When a user sets the DPI scaling to draw fonts and windows larger in all displays, I don't want my application to be affected (I don't want my application's fonts and controls get larger) 当用户设置DPI缩放比例以在所有显示中绘制更大的字体和窗口时,我不希望我的应用程序受到影响(我不希望我的应用程序的字体和控件变大)
I tried to use SetProcessDPIAware() function or add a manifest file, but it didn't work. 我试图使用SetProcessDPIAware()函数或添加清单文件,但是没有用。 How can I prevent windows (XP, 7 and 8) to change my application's font size?
如何防止Windows(XP,7和8)更改应用程序的字体大小?
You're asking the wrong question. 您问错了问题。 You want it to be DPI-independent.
您希望它独立于DPI。 The answer is to size everything in points, and everything relative to that in ems.
答案是按磅计算所有内容,以及相对于ems的所有内容。 Avoid DPI and pixels completely.
完全避免DPI和像素。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.