Maximum desktop size
Hello,
I have heard (but have not yet been able to verify) that Windows XP has a maximum desktop size of 10000 x 5000 Pixels. Does Windows Vista also have a desktop size limit and how big is the maximum supported desktop (provided that you have hardware to drive it)? It would also help, if some one could confirm the XP desktop size limit.
Thanks in advance,
Christoph
I assume you want to change the display resolution ...
This is done via the ChangeDisplaySettingsEx function on Windows XP. I assume it is still the same on Vista, but I did not test it. The following piece of code example should change the display resolution on all available devices:
DISPLAY_DEVICE dpyDev;
::ZeroMemory(&dpyDev, sizeof(DISPLAY_DEVICE));
dpyDev.cb = sizeof(DISPLAY_DEVICE);
DEVMODE devMode;
::ZeroMemory(&devMode, sizeof(DEVMODE));
devMode.dmSize = sizeof(DEVMODE);
devMode.dmPelsWidth = width;
devMode.dmPelsHeight = height;
devMode.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT;
for (DWORD i = 0; ::EnumDisplayDevices(NULL, i, &dpyDev, 0); i++) {
if (::ChangeDisplaySettingsEx(dpyDev.DeviceName, &devMode, NULL, 0,
NULL) != DISP_CHANGE_SUCCESSFUL) {
std::cout << "Changing display resolution failed." << std::endl;
}
}
Btw: Can anyone answer my first question about the maximum desktop size on Windows Vista?
Christoph