Чтобы настроить отображение клонов в Win7, это будет работать, если есть 2 пути и 4 режима
UINT32 cPath=0; //path count
UINT32 cMode=0; //mode count
HRESULT hr;
hr = GetDisplayConfigBufferSizes(QDC_ALL_PATH, &cPath, &cMode);
std::vector<DISPLAYCONFIG_PATH_INFO> pathArray(cPath);
std::vector<DISPLAYCONFIG_MODE_INFO> modeArray(cMode);
hr =QueryDisplayConfig(QDC_ALL_PATHS, &cPath, &pathArray[0], &cMode, &modeArray[0], NULL);
if(hr != ERROR_SUCCESS) { problem in paradise }
if(cPath!=2 || cMode != 4) { anything else is too complex or a single display or already cloned }
// to change resolution also
// int ix=pathArray[0].sourceInfo.modeInfoIdx; assuming path[0] is primary, it should be
// modeArray[ix].sourceMode.width = 320; // :(
// modeArray[ix].sourceMode.hieght = 240; // :(
pathArray[1].flags |= DISPLAYCONFIG_PATH_ACTIVE;
pathArray[1].sourceInfo.modeIdx = pathArray[0].sourceInfo.modeIdx; //same source
pathArray[1].sourceInfo.id = pathArray[0].sourceInfo.id; //same source
hr = SetDisplayConfig(cPath, &pathArray[0], cMode, &modeArray[0], SDC_APPLY | SDC_USE_SUPPLIED_DISPLAY_CONFIG | SDC_ALLOW_CHANGE | SDC_SAVE_TO_DATABASE));
if(hr != ERROR_SUCCESS) { so close!!! }