在第二台显示器上调整大小时,MFC CDockablePane虚线位置错误 [英] MFC CDockablePane dotted line position wrong while resizing on second monitor

查看:164
本文介绍了在第二台显示器上调整大小时,MFC CDockablePane虚线位置错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个MFC单文档多视图应用程序,基本上使用了Visual Studio的向导。

I created a MFC single document multi view application, basically using the wizard of Visual studio.

我遇到一个奇怪的问题。 在调整可停靠窗格的大小时,有时会在错误的位置绘制虚线。 后来我发现它在主显示器上是正确的(一本笔记本,显示器分辨率为1920x1080),如图1所示。  
但是当应用程序在第二台显示器上运行时(分辨率1680x1050),它在调整大小时显示错误的线位置,如图2所示。 在这两种情况下,我都在移动相同的可停靠窗格。

I encounter a strange problem.  While resize the dockable pane, sometimes it draw a dotted line at wrong position.  Later I figure out it it's correct on the main monitor (a note book, monitor resolution 1920x1080), like in picture 1.   But when the application is running on the 2nd monitor(resolution 1680x1050), it shows wrong line position while resizing, like in picture 2.  I am moving same dockable pane in both cases.

如果我更改显示器的分辨率,虚线的位置甚至更奇怪。

If I change the monitor's resolution, the position of the dotted line is even stranger.

它是这不是一个大问题,但这会使应用程序看起来很差。

It's not a big problem but this make the application looks very poor.

图片1

图片2

推荐答案

两台显示器上的DPI缩放是什么?您可以在显示设置中查看此内容。

What is the DPI scaling on both monitors? You can check this out in the display settings.

这是更改文本,应用和其他项目的大小选项。如果这两台显示器不同,您是否为每台显示器启用了高DPI感知?

It is the Change the size of text, apps and other items option. If this is different for both monitors, have you enabled per monitor high DPI awareness?


这篇关于在第二台显示器上调整大小时,MFC CDockablePane虚线位置错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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