SystemParametersInfo DPI 是否感知?
具体来说,当通过 Windows 控制面板显示设置增加 DPI 时,以下代码中的“结果”是否会发生变化?
UINT result = 0;
if(SystemParametersInfo(SPI_GETFOCUSBORDERHEIGHT, 0, &result, 0) != FALSE)
{
result = ?;
}
我自己无法检查的原因是我无法更改我正在使用的计算机上的 DPI 设置,因为管理员已禁用该选项。
Specifically, does "result" change in the following code when the DPI is increased via the windows control panel display settings?
UINT result = 0;
if(SystemParametersInfo(SPI_GETFOCUSBORDERHEIGHT, 0, &result, 0) != FALSE)
{
result = ?;
}
The reason I can't check this myself is that I can't change the DPI setting on the computer I'm working on because the admin has disabled the option.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
文档不清楚,但一般来说,第三个参数只是输入/输出,因为这里的 Win32 API 被重载为 getter 和 setter。我不希望这会在 SET 上改变
调用,但是在上面的 GET 调用中,是的,它会更改以指示当前值。您是否打算实际发布 SET 调用?问题文本暗示您正在尝试设置该值。
对于以下代码,该值不应更改:
对于您发布的代码,
result
将从 0 更改为当前配置的值:The documents are unclear but in general the 3rd param is only in/out because the Win32 API here is overloaded as both a getter and a setter. I would not expect this to change on a SET
call but on the GET call you have above, yes it will change to indicate the current value. Did you intend to actually post a SET call? The question text implies you are trying to set the value.
For the following code, the value ought not to change:
For the code you posted,
result
will change from 0 to the current configured value: