图像显示在不同的屏幕上
我刚刚开始在Windows Mobile应用程序上工作.在我几乎完成这项工作之后,我在装有Windows Mobile 6.5的手机上测试了我的程序.问题是对话框的背景图像没有像我在计算机上运行程序时那样覆盖整个对象.
我必须确保对话框的背景图像可以在各种尺寸的移动屏幕上以各种分辨率正确显示.我该如何实现?
我应该为每个手机屏幕准备不同的图像吗?分辨率呢?我应该考虑哪些因素以及如何考虑?
我正在Visual Studio 2008中使用C ++.
经过充分测试的想法和示例将是最好的..
有人告诉我该怎么做吗?
I just begin to work on windows mobile application. after I nearly done this work, I tested my program on a phone with windows mobile 6.5. problem is the background image of dialog did not cover the whole as it did when I run the program on computer.
I have to make sure that background image of dialog will display correctly on various size of mobile screen with various resolution . how can I achieve that ?
should I prepare different image for each mobile screen? what about resolution ? what factors should I consider and how ?
I am using C++ with visual studio 2008 .
the well tested idea and example would be best..
anyone tell me how to do it?
问题可能是对话框的实际大小(以像素为单位)取决于设备和配置的字体它.
您不会在未知设备上显示固定大小"元素.您应该摆脱对话框的有效大小,并相应地缩放位图.
The problem is probably that the actual size (in pixel) of the dialog depends on the device and on the fonts configured for it.
You sould not diplay a "fixed size" elements on an unknown device. You should insted get rid of the effective size of your dialog, and scale the bitmap acordingly.
您好,Alijman,
您的答案在MSDN中:开发DPI感知应用程序 [
Hi Alijman,
Your answer is in MSDN: Developing DPI Aware Applications[^].
cheers,
AR