如何将所有UI元素的大小加倍 [英] How to double the size of all UI elements

查看:107
本文介绍了如何将所有UI元素的大小加倍的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们提供了一些适合于手持式条形码扫描装置的QVGA屏幕(320x240)的程序.这些设备的制造商现在已转换为VGA屏幕(640x480),这意味着我们的程序现在仅是其应有尺寸的四分之一.通过设置某种映射模式,是否有任何快速方法来使窗口大小增加到所有UI元素的两倍?首先想到的是使用高DPI,但这仅是Windows 7/2008 R2及更高版本的特定用户,对于带有终端服务的2003/2008服务器没有好处.

程序仅使用Windows API以C/C ++编写. (没有MFC等).

We have a few programs that were designed to fit on the QVGA screen (320x240) of a handheld bar code scanning unit. The manufacturer of these units has now changed over to VGA screens (640x480) which means our programs are now only a quarter of the size they should be. Is there any quick way to get windows to double the size of all UI elements by setting some kind of mapping mode? The first thought was to use high DPI but that''s only user specific for windows 7 / 2008 R2 and above, no good for 2003 / 2008 servers with terminal services.

The programs are written in C/C++ using Windows API only. (no MFC etc.)

推荐答案

此MSDN示例看起来很有希望: [
This MSDN example looks promising: "Using Coordinate Spaces and Transformations"[^].


很抱歉,没有回答您的确切问题;我只是认为将应用程序的大小与屏幕的大小相关联的想法是错误的.当用户购买的显示器的大小是前一个显示器的两倍时,他或他不想将应用程序窗口缩放为两个.相反,更常见的是,她希望他同时看到四倍的信息.根据您的要求,您可以打破这种希望.

而且,编写具有分辨率的应用程序要好得多.您会在我过去的答案中找到一些想法:
GUI外观-C#.Net [当屏幕分辨率改变时,Zom Out发生故障 [ ^ ].

—SA
Sorry for not answering your exact question; I simply think the idea to link the size of application to the size of the screen is wrong. When a user purchases a monitor which is twice as big as the previous one, she or he does not want to have application windows scaled by two. Instead, more typically, she or he hopes to see four times more information at the same time. By your request you break this hope.

Also, it''s much better to write resolution-tolerant applications. You will find some ideas in my past answers:
GUI Apperance - C#.Net[^],
Zom Out malfunctions when Screen resolution changes[^].

—SA


这篇关于如何将所有UI元素的大小加倍的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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