Change your screen resolution from the command line

Today I’ve made a little program to quickly change the screen resolution from the command line. It’s written in C++, and can be downloaded from here. The source code looks like this:

Changing the resolution is done using the Win32 API ChangeDisplaySettings. After setting the resolution, running applications need to be notified which is done by calling SendMessage. The rest is pretty straightforward.

One thought on “Change your screen resolution from the command line

Leave a Reply

Your email address will not be published. Required fields are marked *