---
title: "基于Visual C++2010与windows SDK fo windows7开发windows7平台的新特性--HighDPI为视觉障碍的人服务"
author: "winzenghua"
date: "2009-12-27T18:51:00Z"
tags: []
slug: "visual-c-2010-windows-sdk-fo-windows7-windows7-highdpi"
draft: false
lastmod: "2009-12-27T18:51:00Z"
id: 948095
url: "https://java4gis.iteye.com/blog/948095"
---

HighDPI是windows7提出的一种新特性，使应用程序更加容易地为视觉障碍者服务，使程序随着窗口一样自动缩放，

展示完美的效果，下面我们来实践一下，如何开发基于HIGHDPI的应用程序

首先体验下，在英文windows7下如何设置highDPI

在控制面板下设置，设置highDPI新特性

![](http://p.blog.csdn.net/images/p_blog_csdn_net/yincheng01/EntryImages/20100101/1.png)

![](http://p.blog.csdn.net/images/p_blog_csdn_net/yincheng01/EntryImages/20100101/2.png)

您将运行在96 DPI设置和144 DPI设置应用程序，然后比较每个UI元素。

1.运行程序在144 DPI 设置，设置操作系统Win7的操作系统DPI设置为144DPI，创建一个多文档程序ribbon程序

HighDPIAPP1,可见ribbon界面如下：

![](http://p.blog.csdn.net/images/p_blog_csdn_net/yincheng01/EntryImages/20091227/1633975368436145000.png)

2.是否启用HighDPI设置，请打开项目设置，如下图所示，设置Enable DPI Awareness

![](http://p.blog.csdn.net/images/p_blog_csdn_net/yincheng01/EntryImages/20091227/2633975368436457500.png)

运行应用程序在144 DPI的状态下设置为视觉障碍的人使用

请确保您的计算机的设置为DPI144（150％） - 请参阅练习详情1。  
如果确认要为视觉障碍的人的使用，  
在生成菜单上，选择重新生成解决方案。  
在调试菜单上，选择开始调试。  
看看程序在high DPI下的运行，

![](http://p.blog.csdn.net/images/p_blog_csdn_net/yincheng01/EntryImages/20091227/3633975368437082500.png)

**对比下DPI Awareness Disabled 在144 DPI 设置与 the 96 DPI设置**

UI Element

Appearance at 144 DPI with DPI Awareness disabled

Size of the window frame

Much larger

Size of the buttons

Larger

Size of the text

Larger

Blurriness

Yes

改变设置，运行在**144 DPI 设置下看看具体实际效果，**

![](http://p.blog.csdn.net/images/p_blog_csdn_net/yincheng01/EntryImages/20091227/4633975368437551250.png)

随后的图形展示的UI在highDPI上的变化.

UI element

DPI-aware application on a computer set to 144 DPI

Size of the window frame

Larger

Size of the buttons

Larger

Size of the text

Larger

Blurriness

No

任务栏之间，模式比较，highDPI模式与其他模式的不同！字体与控件都变大了，使视觉障碍的人更加容易使用

![](http://p.blog.csdn.net/images/p_blog_csdn_net/yincheng01/EntryImages/20091227/5633975368438020000.png)

本文作者专著《Visual C++2010开发权威指南》即将推出，敬请关注，Visual C++2010最近技术，Windows7开发最新技术！