quote:
ChangeDisplaySettings() with the CDS_TEST flag...?
But what if the wrong monitor driver was installed... would the flag CDS_TEST work at all cases?
quote:
ChangeDisplaySettings() with the CDS_TEST flag...?
DEVMODE devmodes[512]; int n = 0; while (EnumDisplaySettings(NULL, n, &devmodes[n])) { if (ChangeDisplaySettings(&devmodes[n], CDS_TEST) != DISP_CHANGE_SUCCESSFUL) { CString a; a+=devmodes[n].dmPelsWidth; a+=" x "; a+=devmodes[n].dmPelsHeight; a+=" - "; a+=devmodes[n].dmBitsPerPel; a+="bit "; a+=devmodes[n].dmDisplayFrequency; a+="Hz"; m_ModeControl.InsertString(n,a); } n++; }