sazr
sazr

Reputation: 25928

WinAPI function that chages the Display Settings to Duplicate

I am attempting to change the display settings to "Duplicate" when I have 2 monitors connected to a PC?

Ie, I am attempting to select the following setting(outlined in red) but using a WinAPI function call.

enter image description here

My Problem: I dont know what WinAPI function call I use to change the display setting to "Duplicate"? I've googled and haven't found any such function.

I am looking for a function that is supported on Windows 2000 or XP and up and not just a Windows Vista and up function. Does anyone know what WinAPI function call I use to achieve this?

Upvotes: 2

Views: 649

Answers (2)

Jerry Coffin
Jerry Coffin

Reputation: 490128

I believe you want to use ChangeDisplaySettingsEx. You set up DEVMODE structures for both monitors, with the dmPosition member set to (0, 0), and set (only) the DM_POSITION flag, so all you do is change their relative positions, not things like resolution or bit depth.

This is supposed to work back as far as Windows 2000.

Upvotes: 2

Ankur Shah
Ankur Shah

Reputation: 430

i THINK U WILL GET THE ANSWER OF YOU QUESTION LINK BELOW

http://www.c-sharpcorner.com/uploadfile/GemingLeader/changing-display-settings-programmatically/

Upvotes: 1

Related Questions