简体   繁体   English

以编程方式在Windows 10上复制桌面

[英]Programmatically duplicating the desktop on Windows 10

I've been looking into ways to programmatically manage my monitors using C++. 我一直在研究使用C ++以编程方式管理我的监视器的方法。

It looks like functions like EnumDisplayDevices , EnumDisplaySettings and ChangeDisplaySettings can be used to, eg, change the resolution of individual display devices and attaching/detaching said devices to/from the desktop. 看起来像EnumDisplayDevicesEnumDisplaySettingsChangeDisplaySettings之类的函数可以用于例如改变各个显示设备的分辨率以及将所述设备连接到桌面或从桌面拆卸所述设备。

In addition to these operations, I want to be able to duplicate my desktop to multiple monitors. 除了这些操作,我希望能够将我的桌面复制到多个监视器。

A concrete example would be to go from this setup where the desktop spans two devices... 一个具体的例子是从这个桌面跨越两个设备的设置...

在此输入图像描述

...to this setup, where the desktop is instead duplicated to said devices. ...到此设置,其中桌面被复制到所述设备。

在此输入图像描述

I have tried investigating the APIs on MSDN, and looking for similar questions, but cannot seem to find any indication as to whether or not this is possible to do. 我曾尝试在MSDN上调查API,并寻找类似的问题,但似乎无法找到任何关于这是否可行的指示。

Is it possible to use C++ to duplicate my desktop to multiple display devices, and if so, how? 是否可以使用C ++将我的桌面复制到多个显示设备,如果是这样,怎么样? If not, is it then possible to do it some other way, eg using another programming language, or am I forced to use options like the Windows Control Panel to change such settings? 如果没有,是否可以通过其他方式进行,例如使用其他编程语言,或者我是否被迫使用Windows控制面板等选项来更改此类设置?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM