Click here to Skip to main content
15,888,454 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have two display ports in system. Based on the ports ID i need to clone or extend the displays Programatically in C++.

Is any one have an idea how to clone and extend the displays? Do we have any Windows API to do it?

I have used 'EnumDisplayDevices() function to get the display info but am not getting to extend or clone the display.

Any help would be appreciated.

What I have tried:

I have used 'EnumDisplayDevices() function to get the display info but am not getting to extend or clone the display.
Posted
Updated 7-Aug-20 7:29am
v2

1 solution

You are nearby, but changing should do ChangeDisplaySettingsExW .

Read the documentation carefully to get it work.
 
Share this answer
 
Comments
Member 13932867 9-Aug-20 5:57am    
Using the EnumDisplayDevices() function i will get the DeviceID information using that i need to change to either Extended or Cloned.

So based on the DeviceID i need to decide which one to make it cloned and Extended.

Do we have any API which takes the Device ID as input and change the setting?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900