I am planning to buy a 38 inch 3840 x 1600 pixels ultra-wide monitor for my desktop computer. But sometimes I need to make Windows think the resolution of the monitor is 2560x1440 and make the display area to be a 2560x1440 pixel region on the physical monitor. In other words, instead of stretching the contents to the full 38-inch monitor screen, the areas beyond the 2560x1440 pixels display area should be black.
I did see some answers about similar needs such as Windows 10 fullscreen in only portion of the screen. My need is indeed similar, but I also need Windows to think there is only one monitor and its display resolution is 2560x1440. This is because I use proctor software, such as HonorLock, for exams, and such software insists that I use only a single monitor and will maximize the Chrome window to span the whole screen area. If I make the full 38-inch screen available, the exams would be unreadable.