0

我正在编写一个信息亭应用程序,它有 6 个显示器连接到 1 台 PC,带有 2 个 3 头卡。显示器只能支持一种分辨率 1024x768。无论出于何种原因,Windows 7 都将它们检测为分辨率为 1600x1200 的显示器。桌面区域必须按顺序排列,显示器1在左边,6在右边。这是一个在实验室中解决的简单解决方案,只需使用 windows 显示控制面板手动重新排列桌面即可。在我交付驱动信息亭的软件后,在现场这将不起作用,因为如果说显示器出现故障并被更换,Windows 将重新排列桌面和分辨率。我的软件需要以编程方式安排桌面和分辨率。

在一个完美的世界中,我希望能够进行一系列 win32 调用,我可以将它们包装在一个函数中来执行:

Set the resolution of display plugged into video card 0 port 0 to 1024x768
Set the workspace position of display plugged into video card 0 port 0 to 0,0

Set the resolution of display plugged into video card 0 port 1 to 800x600
Set the workspace position of display plugged into video card 0 port 1 to 1024,0

Set the resolution of display plugged into video card 0 port 2 to 1600x1200
Set the workspace position of display plugged into video card 0 port 2 to 1824,0

Set the resolution of display plugged into video card 1 port 0 to 640x480
Set the workspace position of display plugged into video card 1 port 0 to 3424,0

Set the resolution of display plugged into video card 1 port 1 to 1024x768
Set the workspace position of display plugged into video card 1 port 1 to 4448,0

Set the resolution of display plugged into video card 1 port 2 to 1920x1080
Set the workspace position of display plugged into video card 1 port 2 to 6368,0

然后,我会保证视频卡 0 中的端口 0 在左侧,视频卡 1 上的端口 2 在右侧

有谁知道我如何在 C++ 中做到这一点?

编辑 1:更新了决议以更清楚问题的性质

编辑 2:再次更新示例以包含问题的工作区部分

编辑 3:拼写

4

0 回答 0