Quantcast
Channel: Windows Desktop Development for Accessibility and Automation forum
Viewing all articles
Browse latest Browse all 585

How to duplicate display on two monitors using win32 APIs

$
0
0

 I wanted to write one module in win32 which can detach all monitors and attach them back. It is working if no monitors are duplicated. But if two monitors are duplicated then two monitors are under same display eg Display3\Monitor0 and Display3\Monitor1. Detach using ChangeDisplaySettingsEx succeeds but reattach using same API and stored DEVMODE reattaches only one monitor to Display3 and the other monitor just remain disconnected. 

And ChangeDisplaySettingsEx failes if i give full monitor name(eg Display3\Monitor0). It just works for first argument being just DisplayName ( eg Display3).

So someone please guide me  how can i re-attach both monitors to Display3 as there were before detaching.


Viewing all articles
Browse latest Browse all 585

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>