Search code examples
c++monitorscreen-resolution

Change Screen Resolution of Secondary Monitor in C++


I was wondering if someone could help me change the screen resolution of the secondary monitor using C++ on Windows 7. I understand this is not much information so if you need more just comment and I'll provide it.

Thanks in advance,


Solution

  • You can do this by setting the correct resolution in a DEVMODE structure, then calling ChangeDisplaySettingsEx to actually make the change.

    You may want to use EnumDisplaySettingsEx to find a resolution supported by the display and graphics card in question.