dpi和窗口大小的问题

zero_226 2016-08-02 02:30:48
疑问:
我的电脑是win7系统,分辨率为1366*768,我把它的dpi设置为150%,就是下图这个设置。
之后,我用spy++再看我的程序全屏了的窗口,只有919*512.
请问这个时候我的窗口的大小为什么不是1366*768,这个时候我用spy++看别的全屏的窗口,都是这个大小啊,比如ie,系统文件夹窗口。
请了解的人指点一下,谢谢。
...全文
349 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
Cheng_Shirley 2019-08-26
  • 打赏
  • 举报
回复
你再重启下电脑,就能用spy++看完整的应用了。
赵4老师 2016-08-10
  • 打赏
  • 举报
回复
抛砖没引到玉。
zero_226 2016-08-09
  • 打赏
  • 举报
回复
这个帖子最终没有得到有用的帮助,鉴于只有赵老师回复了,分给赵老师,谢谢大家,谢谢赵老师。
赵4老师 2016-08-03
  • 打赏
  • 举报
回复
Pixel sizes have been roughly constant for a long time, but LCD manufacturers are increasingly coming out with monitors with smaller and smaller pixels, also known as high dots per inch (DPI). If an application uses the same number of pixels on a high DPI screen as it does on a standard 96-DPI screen, the application will look very small. Windows Vista and Windows Server 2008 introduce the ability to scale applications that were written for 96-DPI screens, which they do by rendering the application's bitmap at a larger size. Like all bitmap scaling, this rendering can result in some blurriness, but otherwise gives a correctly sized and properly rendered image. Applications can also decide to support high DPI natively, which will give the crispest possible look. Currently an application can turn off scaling and declare itself DPI-aware by calling SetProcessDPIAware. A manifest-based way to make this declaration is under investigation. For more information about writing applications that natively support high DPI, see How to Write High-DPI Applications. The rest of this section talks about potential problems with non-DPI aware applications. Applications ask Windows questions such as "how many pixels wide is a scrollbar", so when a 96-DPI application asks, Windows Vista and Windows Server 2008 give the application the 96 DPI answer. There are, however cases where Windows does not provide an answer based on the application, usually because Windows Vista and Windows Server 2008 do not yet have enough information (please give us this feedback), and sometimes because the "right" answer depends on what the application is trying to do with the answer. (Screen coordinates often raise this problem.) Most compatibility problems come from these imperfect conditions. Things to look for when testing: Text is clipped (partially hidden). Text is too big. Something is drawn at the wrong size or in the wrong place. How to Write High-DPI Applications https://msdn.microsoft.com/en-us/library/ms969894.aspx
zero_226 2016-08-03
  • 打赏
  • 举报
回复
up, up, up 有没有人知道哇???
zero_226 2016-08-02
  • 打赏
  • 举报
回复
这个会跟什么api有关系?
赵4老师 2016-08-02
  • 打赏
  • 举报
回复
在MSDN里面搜相关API

24,854

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 工具平台和程序库
社区管理员
  • 工具平台和程序库社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧