Exemplo n.º 1
0
BOOL CPPageCapture::OnInitDialog()
{
    __super::OnInitDialog();

    SetHandCursor(m_hWnd, IDC_COMBO1);

    const CAppSettings& s = AfxGetAppSettings();

    FindAnalogDevices();
    FindDigitalDevices();

    if (m_cbAnalogVideo.GetCount() && m_cbDigitalTuner.GetCount()) {
        m_iDefaultDevice = s.iDefaultCaptureDevice;
    } else if (m_cbAnalogVideo.GetCount()) {
        m_iDefaultDevice = 0;
        GetDlgItem(IDC_RADIO2)->EnableWindow(FALSE);
    } else if (m_cbDigitalTuner.GetCount()) {
        m_iDefaultDevice = 1;
        GetDlgItem(IDC_RADIO1)->EnableWindow(FALSE);
    } else {
        m_iDefaultDevice = s.iDefaultCaptureDevice;
        GetDlgItem(IDC_RADIO2)->EnableWindow(FALSE);
        GetDlgItem(IDC_RADIO1)->EnableWindow(FALSE);
    }

    m_cbRebuildFilterGraph.AddString(ResStr(IDS_PPAGE_CAPTURE_FG0));
    m_cbRebuildFilterGraph.AddString(ResStr(IDS_PPAGE_CAPTURE_FG1));
    m_cbRebuildFilterGraph.AddString(ResStr(IDS_PPAGE_CAPTURE_FG2));
    m_cbRebuildFilterGraph.SetCurSel(s.nDVBRebuildFilterGraph);
    CorrectComboListWidth(m_cbRebuildFilterGraph);

    m_cbStopFilterGraph.AddString(ResStr(IDS_PPAGE_CAPTURE_SFG0));
    m_cbStopFilterGraph.AddString(ResStr(IDS_PPAGE_CAPTURE_SFG1));
    m_cbStopFilterGraph.AddString(ResStr(IDS_PPAGE_CAPTURE_SFG2));
    m_cbStopFilterGraph.SetCurSel(s.nDVBStopFilterGraph);
    CorrectComboListWidth(m_cbStopFilterGraph);

    OnSelChangeRebuildFilterGraph();
    OnSelChangeStopFilterGraph();

    UpdateData(FALSE);

    SaveFoundDevices(); // Save (new) devices to ensure that comboboxes reflect actual settings.

    EnableToolTips(TRUE);

    return TRUE;
}
BOOL CShaderEditorDlg::Create(CWnd* pParent)
{
	if (!__super::Create(IDD, pParent)) {
		return FALSE;
	}

	AddAnchor(IDC_COMBO1, TOP_LEFT, TOP_RIGHT);
	AddAnchor(IDC_COMBO2, TOP_RIGHT);
	AddAnchor(IDC_EDIT1, TOP_LEFT, BOTTOM_RIGHT);
	AddAnchor(IDC_EDIT2, BOTTOM_LEFT, BOTTOM_RIGHT);
	AddAnchor(IDC_BUTTON1, TOP_RIGHT);

	m_srcdata.SetTabStops(16);

	SetMinTrackSize(CSize(250, 40));

	m_targets.AddString(_T("ps_2_0"));
	m_targets.AddString(_T("ps_2_a"));
	m_targets.AddString(_T("ps_2_sw"));
	m_targets.AddString(_T("ps_3_0"));
	m_targets.AddString(_T("ps_3_sw"));

	POSITION pos = AfxGetAppSettings().m_shaders.GetHeadPosition();

	while (pos) {
		const AppSettings::Shader& s = AfxGetAppSettings().m_shaders.GetNext(pos);
		m_labels.SetItemDataPtr(m_labels.AddString(s.label), (void*)&s);
	}

	CorrectComboListWidth(m_labels);

	m_nIDEventShader = SetTimer(1, 1000, NULL);

	return TRUE;
}
Exemplo n.º 3
0
CComboBox* CPlayerListCtrl::ShowInPlaceComboBox(int nItem, int nCol, CAtlList<CString>& lstItems, int nSel, bool bShowDropDown)
{
    CRect rect;
    if (!PrepareInPlaceControl(nItem, nCol, rect)) {
        return nullptr;
    }

    DWORD dwStyle = /*WS_BORDER|*/WS_CHILD | WS_VISIBLE | WS_VSCROLL /*|WS_HSCROLL*/
                                  | CBS_DROPDOWNLIST | CBS_DISABLENOSCROLL/*|CBS_NOINTEGRALHEIGHT*/;
    CComboBox* pComboBox = DEBUG_NEW CInPlaceComboBox(nItem, nCol, lstItems, nSel);
    pComboBox->Create(dwStyle, rect, this, IDC_COMBO1);

    CorrectComboListWidth(*pComboBox);

    int width = GetColumnWidth(nCol);
    if (pComboBox->GetDroppedWidth() < width) {
        pComboBox->SetDroppedWidth(width);
    }

    if (bShowDropDown) {
        pComboBox->ShowDropDown();
    }

    m_fInPlaceDirty = false;

    return pComboBox;
}
Exemplo n.º 4
0
BOOL COpenDlg::OnInitDialog()
{
	__super::OnInitDialog();

	UpdateData(FALSE);

	CRecentFileList& MRU = AfxGetCurrentSettings().MRU;
	MRU.ReadList();
	m_mrucombo.ResetContent();
	for(int i = 0; i < MRU.GetSize(); i++)
		if(!MRU[i].IsEmpty())
			m_mrucombo.AddString(MRU[i]);
	CorrectComboListWidth(m_mrucombo, GetFont());

	CRecentFileList& MRUDub = AfxGetCurrentSettings().MRUDub;
	MRUDub.ReadList();
	m_mrucombo2.ResetContent();
	for(int i = 0; i < MRUDub.GetSize(); i++)
		if(!MRUDub[i].IsEmpty())
			m_mrucombo2.AddString(MRUDub[i]);
	CorrectComboListWidth(m_mrucombo2, GetFont());

	if(m_mrucombo.GetCount() > 0) {
		m_mrucombo.SetCurSel(0);
	}

	AddAnchor(m_mrucombo, TOP_LEFT, TOP_RIGHT);
	AddAnchor(m_mrucombo2, TOP_LEFT, TOP_RIGHT);
	AddAnchor(IDC_BUTTON1, TOP_RIGHT);
	AddAnchor(IDC_BUTTON2, TOP_RIGHT);
	AddAnchor(IDOK, TOP_RIGHT);
	AddAnchor(IDCANCEL, TOP_RIGHT);
	AddAnchor(IDC_STATIC1, TOP_LEFT, TOP_RIGHT);

	CRect r;
	GetWindowRect(r);
	CSize s = r.Size();
	SetMinTrackSize(s);
	s.cx = 1000;
	SetMaxTrackSize(s);


	return TRUE;  // return TRUE unless you set the focus to a control
	// EXCEPTION: OCX Property Pages should return FALSE
}
Exemplo n.º 5
0
BOOL CShaderCombineDlg::OnInitDialog()
{
	__super::OnInitDialog();

	//AddAnchor(IDOK, TOP_RIGHT);
	//AddAnchor(IDCANCEL, TOP_RIGHT);

	AppSettings& s = AfxGetAppSettings();

	// remember the initial state
	m_fcheck1 = m_oldcheck1 = ((CMainFrame*)AfxGetMainWnd())->m_bToggleShader;
	m_fcheck2 = m_oldcheck2 = ((CMainFrame*)AfxGetMainWnd())->m_bToggleShaderScreenSpace;
	m_oldlabels1.AddTailList(&m_labels1);
	m_oldlabels2.AddTailList(&m_labels2);

	POSITION pos;

	pos = m_labels1.GetHeadPosition();
	while (pos) {
		m_list1.AddString(m_labels1.GetNext(pos));
	}
	m_list1.AddString(_T(""));

	pos = m_labels2.GetHeadPosition();
	while (pos) {
		m_list2.AddString(m_labels2.GetNext(pos));
	}
	m_list2.AddString(_T(""));

	pos = s.m_shaders.GetHeadPosition();
	CString str;
	while (pos) {
		str = s.m_shaders.GetNext(pos).label;
		m_combo.AddString(str);
	}

	if (m_combo.GetCount()) {
		m_combo.SetCurSel(0);
		CorrectComboListWidth(m_combo);
	}

	UpdateData(FALSE);

	return TRUE;  // return TRUE unless you set the focus to a control
	// EXCEPTION: OCX Property Pages should return FALSE
}
bool CMPCDXVAVideoDecSettingsWnd::OnActivate()
{
    ASSERT(IPP_FONTSIZE == 13);
    const int h20 = IPP_SCALE(20);
    const int h25 = IPP_SCALE(25);
    DWORD dwStyle = WS_VISIBLE | WS_CHILD | WS_TABSTOP;
    CPoint p(10, 10);
    GUID* DxvaGui = nullptr;

    //m_grpFFMpeg.Create(ResStr(IDS_VDF_FFSETTINGS), WS_VISIBLE | WS_CHILD | BS_GROUPBOX, CRect(p + CPoint(-5, 0), CSize(IPP_SCALE(350), h20 + h25 * 3 + h20)), this, (UINT)IDC_STATIC);
    //p.y += h20;

    // Read AR from stream
    m_cbARMode.Create(ResStr(IDS_VDF_AR_MODE), dwStyle | BS_AUTOCHECKBOX | BS_LEFTTEXT, CRect(p, CSize(IPP_SCALE(340), m_fontheight)), this, IDC_PP_AR);
    m_cbARMode.SetCheck(FALSE);
    p.y += h25;

    // Interlaced flag
    m_txtInterlacedFlag.Create(ResStr(IDS_VDF_INTERLACED_FLAG), WS_VISIBLE | WS_CHILD, CRect(p, CSize(IPP_SCALE(220), m_fontheight)), this, (UINT)IDC_STATIC);
    m_cbInterlacedFlag.Create(dwStyle | CBS_DROPDOWNLIST | WS_VSCROLL, CRect(p + CPoint(IPP_SCALE(230), -6), CSize(IPP_SCALE(110), 200)), this, IDC_PP_INTERLACED_FLAG);
    m_cbInterlacedFlag.AddString(ResStr(IDS_VDF_AUTO));
    m_cbInterlacedFlag.AddString(ResStr(IDS_VDF_IF_PROGRESSIVE));
    m_cbInterlacedFlag.AddString(ResStr(IDS_VDF_IF_TOP_FIELD_FIRST));
    m_cbInterlacedFlag.AddString(ResStr(IDS_VDF_IF_BOTTOM_FIELD_FIRST));
    p.y += h25;

    //m_grpDXVA.Create(ResStr(IDS_VDF_DXVA_SETTING), WS_VISIBLE | WS_CHILD | BS_GROUPBOX, CRect(p + CPoint(-5, 0), CSize(IPP_SCALE(350), h20 + h25 + h20 * 3 + m_fontheight)), this, (UINT)IDC_STATIC);
    //p.y += h20;

    // DXVA Compatibility check
    m_txtDXVACompatibilityCheck.Create(ResStr(IDS_VDF_DXVACOMPATIBILITY), WS_VISIBLE | WS_CHILD, CRect(p, CSize(IPP_SCALE(225), m_fontheight)), this, (UINT)IDC_STATIC);
    m_cbDXVACompatibilityCheck.Create(dwStyle | CBS_DROPDOWNLIST | WS_VSCROLL, CRect(p + CPoint(IPP_SCALE(230), -4), CSize(IPP_SCALE(110), 200)), this, IDC_PP_DXVA_CHECK);
    m_cbDXVACompatibilityCheck.AddString(ResStr(IDS_VDF_DXVA_FULLCHECK));
    m_cbDXVACompatibilityCheck.AddString(ResStr(IDS_VDF_DXVA_SKIP_LEVELCHECK));
    m_cbDXVACompatibilityCheck.AddString(ResStr(IDS_VDF_DXVA_SKIP_REFCHECK));
    m_cbDXVACompatibilityCheck.AddString(ResStr(IDS_VDF_DXVA_SKIP_ALLCHECK));
    p.y += h25;

    // Set DXVA for SD (H.264)
    m_cbDXVA_SD.Create(ResStr(IDS_VDF_DXVA_SD), dwStyle | BS_AUTOCHECKBOX | BS_LEFTTEXT, CRect(p, CSize(IPP_SCALE(340), m_fontheight)), this, IDC_PP_DXVA_SD);
    m_cbDXVA_SD.SetCheck(FALSE);
    p.y += h25;

    // DXVA mode
    m_txtDXVAMode.Create(ResStr(IDS_VDF_DXVA_MODE), WS_VISIBLE | WS_CHILD, CRect(p, CSize(IPP_SCALE(120), m_fontheight)), this, (UINT)IDC_STATIC);
    m_edtDXVAMode.Create(WS_CHILD | WS_VISIBLE | WS_DISABLED, CRect(p + CPoint(IPP_SCALE(120), 0), CSize(IPP_SCALE(220), m_fontheight)), this, 0);
    p.y += h20;

    // Video card description
    m_txtVideoCardDescription.Create(ResStr(IDS_VDF_VIDEOCARD), WS_VISIBLE | WS_CHILD, CRect(p, CSize(IPP_SCALE(120), m_fontheight)), this, (UINT)IDC_STATIC);
    m_edtVideoCardDescription.Create(ES_MULTILINE | WS_CHILD | WS_VISIBLE | WS_DISABLED, CRect(p + CPoint(IPP_SCALE(120), 0), CSize(IPP_SCALE(220), m_fontheight * 2)), this, 0);
    m_edtVideoCardDescription.SetWindowText(m_pMDF->GetVideoCardDescription());

    DxvaGui = m_pMDF->GetDXVADecoderGuid();
    if (DxvaGui != nullptr) {
        CString DXVAMode = GetDXVAMode(DxvaGui);
        m_edtDXVAMode.SetWindowText(DXVAMode);
    } else {
        m_txtDXVAMode.ShowWindow(SW_HIDE);
        m_edtDXVAMode.ShowWindow(SW_HIDE);
    }

    for (CWnd* pWnd = GetWindow(GW_CHILD); pWnd; pWnd = pWnd->GetNextWindow()) {
        pWnd->SetFont(&m_font, FALSE);
    }

    CorrectComboListWidth(m_cbDXVACompatibilityCheck);

    if (m_pMDF) {
 
        m_cbARMode.SetCheck(m_pMDF->GetARMode());
    	 
        m_cbDXVACompatibilityCheck.SetCurSel(m_pMDF->GetDXVACheckCompatibility());
        m_cbDXVA_SD.SetCheck(m_pMDF->GetDXVA_SD());

        m_cbInterlacedFlag.SetCurSel(m_pMDF->GetInterlacedFlag());
    }

    return true;
Exemplo n.º 7
0
void CDVSMainPPage::UpdateControlData(bool fSave)
{
    if (fSave) {
        CString fn;
        m_fnedit.GetWindowText(fn);
        wcscpy_s(m_fn, fn);

        m_iSelectedLanguage = m_langs.GetCurSel();
        m_fOverridePlacement = !!m_oplacement.GetCheck();
        m_PlacementXperc = m_subposx.GetPos32();
        m_PlacementYperc = m_subposy.GetPos32();
        m_fOnlyShowForcedVobSubs = !!m_forcedsubs.GetCheck();
        if (m_PARCombo.GetCurSel() != CB_ERR) {
            m_ePARCompensationType = static_cast<CSimpleTextSubtitle::EPARCompensationType>(m_PARCombo.GetItemData(m_PARCombo.GetCurSel()));
        } else {
            m_ePARCompensationType = CSimpleTextSubtitle::EPCTDisabled;
        }
    } else {
        m_fnedit.SetWindowText(CString(m_fn));
        m_oplacement.SetCheck(m_fOverridePlacement);
        m_subposx.SetRange32(-20, 120);
        m_subposx.SetPos32(m_PlacementXperc);
        m_subposx.EnableWindow(m_fOverridePlacement);
        m_subposy.SetRange32(-20, 120);
        m_subposy.SetPos32(m_PlacementYperc);
        m_subposy.EnableWindow(m_fOverridePlacement);
        m_font.SetWindowText(m_defStyle.fontName);
        m_forcedsubs.SetCheck(m_fOnlyShowForcedVobSubs);
        m_langs.ResetContent();
        m_langs.EnableWindow(m_nLangs > 0);
        for (ptrdiff_t i = 0; i < m_nLangs; i++) {
            m_langs.AddString(CString(m_ppLangs[i]));
        }
        CorrectComboListWidth(m_langs);
        m_langs.SetCurSel(m_iSelectedLanguage);

        m_PARCombo.ResetContent();
        m_PARCombo.InsertString(0, ResStr(IDS_RT_PAR_DISABLED));
        m_PARCombo.SetItemData(0, CSimpleTextSubtitle::EPCTDisabled);
        if (m_ePARCompensationType == CSimpleTextSubtitle::EPCTDisabled) {
            m_PARCombo.SetCurSel(0);
        }

        m_PARCombo.InsertString(1, ResStr(IDS_RT_PAR_DOWNSCALE));
        m_PARCombo.SetItemData(1, CSimpleTextSubtitle::EPCTDownscale);
        if (m_ePARCompensationType == CSimpleTextSubtitle::EPCTDownscale) {
            m_PARCombo.SetCurSel(1);
        }

        m_PARCombo.InsertString(2, ResStr(IDS_RT_PAR_UPSCALE));
        m_PARCombo.SetItemData(2, CSimpleTextSubtitle::EPCTUpscale);
        if (m_ePARCompensationType == CSimpleTextSubtitle::EPCTUpscale) {
            m_PARCombo.SetCurSel(2);
        }

        m_PARCombo.InsertString(3, ResStr(IDS_RT_PAR_ACCURATE_SIZE));
        m_PARCombo.SetItemData(3, CSimpleTextSubtitle::EPCTAccurateSize);
        if (m_ePARCompensationType == CSimpleTextSubtitle::EPCTAccurateSize) {
            m_PARCombo.SetCurSel(3);
        }
    }
}
Exemplo n.º 8
0
BOOL CPPageOutput::OnInitDialog()
{
    __super::OnInitDialog();

    SetHandCursor(m_hWnd, IDC_AUDRND_COMBO);

    const CAppSettings& s = AfxGetAppSettings();
    const CRenderersSettings& r = s.m_RenderersSettings;

    m_iDSVideoRendererType  = s.iDSVideoRendererType;
    m_iRMVideoRendererType  = s.iRMVideoRendererType;
    m_iQTVideoRendererType  = s.iQTVideoRendererType;

    m_APSurfaceUsageCtrl.AddString(ResStr(IDS_PPAGE_OUTPUT_SURF_OFFSCREEN));
    m_APSurfaceUsageCtrl.AddString(ResStr(IDS_PPAGE_OUTPUT_SURF_2D));
    m_APSurfaceUsageCtrl.AddString(ResStr(IDS_PPAGE_OUTPUT_SURF_3D));
    CorrectComboListWidth(m_APSurfaceUsageCtrl);
    m_iAPSurfaceUsage       = r.iAPSurfaceUsage;

    m_DX9ResizerCtrl.AddString(ResStr(IDS_PPAGE_OUTPUT_RESIZE_NN));
    m_DX9ResizerCtrl.AddString(ResStr(IDS_PPAGE_OUTPUT_RESIZER_BILIN));
    m_DX9ResizerCtrl.AddString(ResStr(IDS_PPAGE_OUTPUT_RESIZER_BIL_PS));
    m_DX9ResizerCtrl.AddString(ResStr(IDS_PPAGE_OUTPUT_RESIZER_BICUB1));
    m_DX9ResizerCtrl.AddString(ResStr(IDS_PPAGE_OUTPUT_RESIZER_BICUB2));
    m_DX9ResizerCtrl.AddString(ResStr(IDS_PPAGE_OUTPUT_RESIZER_BICUB3));
    m_iDX9Resizer           = r.iDX9Resizer;

    m_fVMR9MixerMode        = r.fVMR9MixerMode;
    m_fVMR9MixerYUV         = r.fVMR9MixerYUV;
    m_fVMR9AlterativeVSync  = r.m_AdvRendSets.fVMR9AlterativeVSync;
    m_fD3DFullscreen        = s.fD3DFullscreen;

    int EVRBuffers[] = { 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 25, 30, 35, 40, 45, 50, 55, 60 };
    CString EVRBuffer;
    for (size_t i = 0; i < _countof(EVRBuffers); i++) {
        EVRBuffer.Format(_T("%d"), EVRBuffers[i]);
        m_EVRBuffersCtrl.AddString(EVRBuffer);
    }
    m_iEvrBuffers.Format(_T("%d"), r.iEvrBuffers);

    m_iAudioRendererTypeCtrl.SetRedraw(FALSE);
    m_fResetDevice = s.m_RenderersSettings.fResetDevice;
    m_AudioRendererDisplayNames.Add(_T(""));
    m_iAudioRendererTypeCtrl.AddString(_T("1: ") + ResStr(IDS_PPAGE_OUTPUT_SYS_DEF));
    m_iAudioRendererType = 0;

    int i = 2;
    CString Cbstr;

    BeginEnumSysDev(CLSID_AudioRendererCategory, pMoniker) {
        LPOLESTR olestr = nullptr;
        if (FAILED(pMoniker->GetDisplayName(0, 0, &olestr))) {
            continue;
        }

        CStringW str(olestr);
        CoTaskMemFree(olestr);

        m_AudioRendererDisplayNames.Add(CString(str));

        CComPtr<IPropertyBag> pPB;
        if (SUCCEEDED(pMoniker->BindToStorage(0, 0, IID_IPropertyBag, (void**)&pPB))) {
            CComVariant var;
            pPB->Read(CComBSTR(_T("FriendlyName")), &var, nullptr);

            CString fstr(var.bstrVal);

            var.Clear();
            if (SUCCEEDED(pPB->Read(CComBSTR(_T("FilterData")), &var, nullptr))) {
                BSTR* pbstr;
                if (SUCCEEDED(SafeArrayAccessData(var.parray, (void**)&pbstr))) {
                    fstr.Format(_T("%s (%08x)"), CString(fstr), *((DWORD*)pbstr + 1));
                    SafeArrayUnaccessData(var.parray);
                }
            }
            Cbstr.Format(_T("%d: %s"), i, fstr);
        } else {
            Cbstr.Format(_T("%d: %s"), i, CString(str));
        }
        m_iAudioRendererTypeCtrl.AddString(Cbstr);

        if (s.strAudioRendererDisplayName == str && m_iAudioRendererType == 0) {
            m_iAudioRendererType = m_iAudioRendererTypeCtrl.GetCount() - 1;
        }
        i++;
    }
Exemplo n.º 9
0
BOOL CPPageFullscreen::OnInitDialog()
{
    __super::OnInitDialog();

    SetHandCursor(m_hWnd, IDC_COMBO1);

    const CAppSettings& s = AfxGetAppSettings();

    m_fullScreenMonitor = s.strFullScreenMonitor;
    m_bLaunchFullscreen = s.fLaunchfullscreen;
    m_fExitFullScreenAtTheEnd = s.fExitFullScreenAtTheEnd;

    m_autoChangeFSModes = s.autoChangeFSMode.modes;
    m_bAutoChangeFSModeEnabled = s.autoChangeFSMode.bEnabled;
    m_bAutoChangeFSModeApplyDefModeAtFSExist = s.autoChangeFSMode.bApplyDefaultModeAtFSExit;
    m_bAutoChangeFSModeRestoreResAfterProgExit = s.autoChangeFSMode.bRestoreResAfterProgExit;
    m_uAutoChangeFullscrResDelay = s.autoChangeFSMode.uDelay;

    CMonitors monitors;

    CString currentMonitorName;
    monitors.GetNearestMonitor(AfxGetMainWnd()).GetName(currentMonitorName);

    m_fullScreenMonitorCtrl.AddString(ResStr(IDS_FULLSCREENMONITOR_CURRENT));
    m_monitorDisplayNames.emplace_back(_T("Current"));
    m_iFullScreenMonitor = 0;

    for (int i = 0; i < monitors.GetCount(); i++) {
        CMonitor monitor = monitors.GetMonitor(i);

        if (monitor.IsMonitor()) {
            CString monitorName;
            monitor.GetName(monitorName);

            CString str = monitorName;
            if (monitorName == currentMonitorName) {
                str.AppendFormat(_T(" - [%s]"), ResStr(IDS_FULLSCREENMONITOR_CURRENT));
            }

            DISPLAY_DEVICE displayDevice = { sizeof(displayDevice) };
            if (EnumDisplayDevices(monitorName, 0, &displayDevice, 0)) {
                str.AppendFormat(_T(" - %s"), displayDevice.DeviceString);
            }

            m_fullScreenMonitorCtrl.AddString(str);
            m_monitorDisplayNames.emplace_back(monitorName);

            if (m_fullScreenMonitor == monitorName && m_iFullScreenMonitor == 0) {
                m_iFullScreenMonitor = m_fullScreenMonitorCtrl.GetCount() - 1;
            }
        }
    }

    if (m_fullScreenMonitorCtrl.GetCount() > 2) {
        GetDlgItem(IDC_COMBO1)->EnableWindow(TRUE);
    } else {
        m_iFullScreenMonitor = 0;
        GetDlgItem(IDC_COMBO1)->EnableWindow(FALSE);
    }

    m_list.SetExtendedStyle(m_list.GetExtendedStyle() | LVS_EX_FULLROWSELECT | LVS_EX_DOUBLEBUFFER
                            | LVS_EX_GRIDLINES | LVS_EX_BORDERSELECT | LVS_EX_ONECLICKACTIVATE | LVS_EX_CHECKBOXES | LVS_EX_FLATSB);
    m_list.InsertColumn(COL_N, ResStr(IDS_PPAGE_FS_CLN_ON_OFF), LVCFMT_LEFT, 60);
    m_list.InsertColumn(COL_FRAMERATE_START, ResStr(IDS_PPAGE_FS_CLN_FROM_FPS), LVCFMT_RIGHT, 60);
    m_list.InsertColumn(COL_FRAMERATE_STOP, ResStr(IDS_PPAGE_FS_CLN_TO_FPS), LVCFMT_RIGHT, 60);
    m_list.InsertColumn(COL_DISPLAY_MODE, ResStr(IDS_PPAGE_FS_CLN_DISPLAY_MODE), LVCFMT_LEFT, 135);


    m_bHideFullscreenControls = s.bHideFullscreenControls;
    m_uHideFullscreenControlsDelay = s.uHideFullscreenControlsDelay;
    m_bHideFullscreenDockedPanels = s.bHideFullscreenDockedPanels;

    auto addHidePolicy = [&](LPCTSTR lpszName, CAppSettings::HideFullscreenControlsPolicy ePolicy) {
        int n = m_hidePolicy.InsertString(-1, lpszName);
        if (n >= 0) {
            VERIFY(m_hidePolicy.SetItemData(n, static_cast<DWORD_PTR>(ePolicy)) != CB_ERR);
            if (ePolicy == s.eHideFullscreenControlsPolicy) {
                VERIFY(m_hidePolicy.SetCurSel(n) == n);
            }
        } else {
            ASSERT(FALSE);
        }
    };
    auto loadString = [&](UINT nID) {
        CString ret;
        VERIFY(ret.LoadString(nID));
        return ret;
    };
    addHidePolicy(loadString(IDS_PPAGEFULLSCREEN_SHOWNEVER), CAppSettings::HideFullscreenControlsPolicy::SHOW_NEVER);
    addHidePolicy(loadString(IDS_PPAGEFULLSCREEN_SHOWMOVED), CAppSettings::HideFullscreenControlsPolicy::SHOW_WHEN_CURSOR_MOVED);
    addHidePolicy(loadString(IDS_PPAGEFULLSCREEN_SHOHHOVERED), CAppSettings::HideFullscreenControlsPolicy::SHOW_WHEN_HOVERED);

    m_delaySpinner.SetRange32(0, 9);

    CorrectComboListWidth(m_fullScreenMonitorCtrl);
    CorrectComboListWidth(m_hidePolicy);
    CorrectComboBoxHeaderWidth(GetDlgItem(IDC_CHECK2));
    CorrectComboBoxHeaderWidth(GetDlgItem(IDC_CHECK4));

    ModesUpdate();

    EnableToolTips(TRUE);

    UpdateData(FALSE);

    return TRUE;  // return TRUE unless you set the focus to a control
    // EXCEPTION: OCX Property Pages should return FALSE
}
Exemplo n.º 10
0
BOOL COpenDlg::OnInitDialog()
{
	__super::OnInitDialog();

	AppSettings& s = AfxGetAppSettings();

	CRecentFileList& MRU = s.MRU;
	MRU.ReadList();
	m_mrucombo.ResetContent();

	for (int i = 0; i < MRU.GetSize(); i++)
		if (!MRU[i].IsEmpty()) {
			m_mrucombo.AddString(MRU[i]);
		}

	CorrectComboListWidth(m_mrucombo);

	CRecentFileList& MRUDub = s.MRUDub;
	MRUDub.ReadList();
	m_mrucombo2.ResetContent();

	for (int i = 0; i < MRUDub.GetSize(); i++)
		if (!MRUDub[i].IsEmpty()) {
			m_mrucombo2.AddString(MRUDub[i]);
		}

	CorrectComboListWidth(m_mrucombo2);

	if (m_mrucombo.GetCount() > 0) {
		m_mrucombo.SetCurSel(0);
	}

	if (::IsClipboardFormatAvailable(CF_UNICODETEXT) && ::OpenClipboard(m_hWnd)) {
		HGLOBAL hglb = ::GetClipboardData(CF_UNICODETEXT);
		if (hglb) {
			LPCTSTR pText = (LPCTSTR)::GlobalLock(hglb);
			if (pText) {
				if (AfxIsValidString(pText)) {
					CString tmpData(CString(pText).MakeLower());
					if (PlayerYouTubeCheck(tmpData) || PlayerYouTubePlaylistCheck(tmpData)) {
						m_mrucombo.SetWindowTextW(pText);
					}
				}
				GlobalUnlock(hglb);
			}
		}
		CloseClipboard();
	}

	m_fns.RemoveAll();
	m_path.Empty();
	m_path2.Empty();
	m_fMultipleFiles = false;
	m_fAppendPlaylist = FALSE;

	AddAnchor(m_mrucombo, TOP_LEFT, TOP_RIGHT);
	AddAnchor(m_mrucombo2, TOP_LEFT, TOP_RIGHT);
	AddAnchor(IDC_BUTTON1, TOP_RIGHT);
	AddAnchor(IDC_BUTTON2, TOP_RIGHT);
	AddAnchor(IDOK, TOP_RIGHT);
	AddAnchor(IDCANCEL, TOP_RIGHT);
	AddAnchor(IDC_STATIC1, TOP_LEFT, TOP_RIGHT);

	CRect r;
	GetWindowRect(r);
	CSize sr = r.Size();
	SetMinTrackSize(sr);
	sr.cx = 1000;
	SetMaxTrackSize(sr);

	if (m_hIcon != NULL) {
		CStatic *pStat = (CStatic*)GetDlgItem(IDC_MAINFRAME_ICON);
		pStat->SetIcon(m_hIcon);
	}

	return TRUE;
}
Exemplo n.º 11
0
BOOL CPPageVideo::OnInitDialog()
{
	__super::OnInitDialog();

	SetHandCursor(m_hWnd, IDC_AUDRND_COMBO);
	SetHandCursor(m_hWnd, IDC_BUTTON1);

	AppSettings& s = AfxGetAppSettings();

	CRenderersSettings& renderersSettings = s.m_RenderersSettings;
	m_iDSVideoRendererType	= s.iDSVideoRendererType;
	m_iRMVideoRendererType	= s.iRMVideoRendererType;
	m_iQTVideoRendererType	= s.iQTVideoRendererType;
	m_iAPSurfaceUsage		= renderersSettings.iAPSurfaceUsage;
	m_iDX9Resizer			= renderersSettings.iDX9Resizer;
	m_fVMRMixerMode			= renderersSettings.fVMRMixerMode;
	m_fVMRMixerYUV			= renderersSettings.fVMRMixerYUV;
	m_fVMR9AlterativeVSync	= renderersSettings.m_AdvRendSets.fVMR9AlterativeVSync;
	m_fD3DFullscreen		= s.fD3DFullscreen;
	m_iEvrBuffers.Format(L"%d", renderersSettings.iEvrBuffers);

	m_fResetDevice = s.m_RenderersSettings.fResetDevice;

	IDirect3D9* pD3D = Direct3DCreate9(D3D_SDK_VERSION);
	if (pD3D) {
		TCHAR strGUID[50] = {0};
		CString cstrGUID;
		CString d3ddevice_str;
		CStringArray adapterList;

		D3DADAPTER_IDENTIFIER9 adapterIdentifier;

		for (UINT adp = 0; adp < pD3D->GetAdapterCount(); ++adp) {
			if (SUCCEEDED(pD3D->GetAdapterIdentifier(adp, 0, &adapterIdentifier))) {
				d3ddevice_str = adapterIdentifier.Description;
				d3ddevice_str += _T(" - ");
				d3ddevice_str += adapterIdentifier.DeviceName;
				cstrGUID.Empty();
				if (::StringFromGUID2(adapterIdentifier.DeviceIdentifier, strGUID, 50) > 0) {
					cstrGUID = strGUID;
				}
				if (cstrGUID.GetLength() > 0) {
					boolean m_find = false;
					for (INT_PTR i = 0; (!m_find) && (i < m_D3D9GUIDNames.GetCount()); i++) {
						if (m_D3D9GUIDNames.GetAt(i) == cstrGUID) {
							m_find = true;
						}
					}
					if (!m_find) {
						m_iD3D9RenderDeviceCtrl.AddString(d3ddevice_str);
						m_D3D9GUIDNames.Add(cstrGUID);
						if (renderersSettings.D3D9RenderDevice == cstrGUID) {
							m_iD3D9RenderDevice = m_iD3D9RenderDeviceCtrl.GetCount() - 1;
						}
					}
				}
			}
		}
		pD3D->Release();
	}

	CorrectComboListWidth(m_iD3D9RenderDeviceCtrl);

	auto addRenderer = [&](int nID) {
		CString sName;

		switch (nID) {
			case VIDRNDT_DS_DEFAULT:
				sName = ResStr(IDS_PPAGE_OUTPUT_SYS_DEF);
				break;
			case VIDRNDT_DS_OVERLAYMIXER:
				if (!IsWinXP()) {
					return;
				}
				sName = ResStr(IDS_PPAGE_OUTPUT_OVERLAYMIXER);
				break;
			case VIDRNDT_DS_VMR7WINDOWED:
				sName = ResStr(IDS_PPAGE_OUTPUT_VMR7WINDOWED);
				break;
			case VIDRNDT_DS_VMR9WINDOWED:
				sName = ResStr(IDS_PPAGE_OUTPUT_VMR9WINDOWED);
				break;
			case VIDRNDT_DS_VMR7RENDERLESS:
				sName = ResStr(IDS_PPAGE_OUTPUT_VMR7RENDERLESS);
				break;
			case VIDRNDT_DS_VMR9RENDERLESS:
				sName = ResStr(IDS_PPAGE_OUTPUT_VMR9RENDERLESS);
				break;
			case VIDRNDT_DS_DXR:
				sName = ResStr(IDS_PPAGE_OUTPUT_DXR);
				break;
			case VIDRNDT_DS_NULL_COMP:
				sName = ResStr(IDS_PPAGE_OUTPUT_NULL_COMP);
				break;
			case VIDRNDT_DS_NULL_UNCOMP:
				sName = ResStr(IDS_PPAGE_OUTPUT_NULL_UNCOMP);
				break;
			case VIDRNDT_DS_EVR:
				sName = ResStr(IDS_PPAGE_OUTPUT_EVR);
				break;
			case VIDRNDT_DS_EVR_CUSTOM:
				sName = ResStr(IDS_PPAGE_OUTPUT_EVR_CUSTOM);
				break;
			case VIDRNDT_DS_MADVR:
				sName = ResStr(IDS_PPAGE_OUTPUT_MADVR);
				break;
			case VIDRNDT_DS_SYNC:
				sName = ResStr(IDS_PPAGE_OUTPUT_SYNC);
				break;
			default:
				ASSERT(FALSE);
				return;
		}

		if (!IsRenderTypeAvailable(nID)) {
			sName.AppendFormat(L" %s", ResStr(IDS_PPAGE_OUTPUT_UNAVAILABLE));
		}

		m_iDSVideoRendererTypeCtrl.SetItemData(m_iDSVideoRendererTypeCtrl.AddString(sName), nID);
	};


	CComboBox& m_iDSVRTC = m_iDSVideoRendererTypeCtrl;
	m_iDSVRTC.SetRedraw(FALSE);
	addRenderer(VIDRNDT_DS_DEFAULT);
	addRenderer(VIDRNDT_DS_OVERLAYMIXER);
	addRenderer(VIDRNDT_DS_VMR7WINDOWED);
	addRenderer(VIDRNDT_DS_VMR9WINDOWED);
	addRenderer(VIDRNDT_DS_VMR7RENDERLESS);
	addRenderer(VIDRNDT_DS_VMR9RENDERLESS);
	addRenderer(VIDRNDT_DS_EVR);
	addRenderer(VIDRNDT_DS_EVR_CUSTOM);
	addRenderer(VIDRNDT_DS_SYNC);
	addRenderer(VIDRNDT_DS_DXR);
	addRenderer(VIDRNDT_DS_MADVR);
	addRenderer(VIDRNDT_DS_NULL_COMP);
	addRenderer(VIDRNDT_DS_NULL_UNCOMP);

	for (int i = 0; i < m_iDSVRTC.GetCount(); ++i) {
		if (m_iDSVideoRendererType == m_iDSVRTC.GetItemData(i)) {
			if (IsRenderTypeAvailable(m_iDSVideoRendererType)) {
				m_iDSVRTC.SetCurSel(i);
				m_iDSVideoRendererType_store = m_iDSVideoRendererType;
			} else {
				m_iDSVRTC.SetCurSel(0);
			}
			break;
		}
	}

	m_iDSVRTC.SetRedraw(TRUE);
	m_iDSVRTC.Invalidate();
	m_iDSVRTC.UpdateWindow();

	CComboBox& m_iQTVRTC = m_iQTVideoRendererTypeCtrl;
	m_iQTVRTC.SetItemData(m_iQTVRTC.AddString(ResStr(IDS_PPAGE_OUTPUT_SYS_DEF)), VIDRNDT_QT_DEFAULT);
	m_iQTVRTC.SetItemData(m_iQTVRTC.AddString(ResStr(IDS_PPAGE_OUTPUT_VMR7RENDERLESS)), VIDRNDT_QT_DX7);
	m_iQTVRTC.SetItemData(m_iQTVRTC.AddString(ResStr(IDS_PPAGE_OUTPUT_VMR9RENDERLESS)), VIDRNDT_QT_DX9);
	m_iQTVRTC.SetCurSel(m_iQTVideoRendererType);
	CorrectComboListWidth(m_iQTVRTC);

	CComboBox& m_iRMVRTC = m_iRMVideoRendererTypeCtrl;
	m_iRMVideoRendererTypeCtrl.SetItemData(m_iRMVRTC.AddString(ResStr(IDS_PPAGE_OUTPUT_SYS_DEF)), VIDRNDT_RM_DEFAULT);
	m_iRMVRTC.SetItemData(m_iRMVRTC.AddString(ResStr(IDS_PPAGE_OUTPUT_VMR7RENDERLESS)), VIDRNDT_RM_DX7);
	m_iRMVRTC.SetItemData(m_iRMVRTC.AddString(ResStr(IDS_PPAGE_OUTPUT_VMR9RENDERLESS)), VIDRNDT_RM_DX9);
	m_iRMVRTC.SetCurSel(m_iRMVideoRendererType);
	CorrectComboListWidth(m_iRMVRTC);

	UpdateData(FALSE);

	CreateToolTip();
	m_wndToolTip.AddTool(GetDlgItem(IDC_VIDRND_COMBO), L"");
	m_wndToolTip.AddTool(GetDlgItem(IDC_RMRND_COMBO), L"");
	m_wndToolTip.AddTool(GetDlgItem(IDC_QTRND_COMBO), L"");
	m_wndToolTip.AddTool(GetDlgItem(IDC_DX_SURFACE), L"");

	OnDSRendererChange();
	OnRMRendererChange();
	OnQTRendererChange();
	OnSurfaceChange();

	CheckDlgButton(IDC_D3D9DEVICE, BST_UNCHECKED);
	GetDlgItem(IDC_D3D9DEVICE)->EnableWindow(FALSE);
	GetDlgItem(IDC_D3D9DEVICE_COMBO)->EnableWindow(FALSE);

	switch (m_iDSVideoRendererType) {
		case VIDRNDT_DS_VMR9RENDERLESS:
		case VIDRNDT_DS_EVR_CUSTOM:
			if (m_iD3D9RenderDeviceCtrl.GetCount() > 1) {
					GetDlgItem(IDC_D3D9DEVICE)->EnableWindow(TRUE);
					GetDlgItem(IDC_D3D9DEVICE_COMBO)->EnableWindow(FALSE);
					CheckDlgButton(IDC_D3D9DEVICE, BST_UNCHECKED);
					if (m_iD3D9RenderDevice != -1) {
						CheckDlgButton(IDC_D3D9DEVICE, BST_CHECKED);
						GetDlgItem(IDC_D3D9DEVICE_COMBO)->EnableWindow(TRUE);
					}
			}
			break;
		default:
			GetDlgItem(IDC_D3D9DEVICE)->EnableWindow(FALSE);
			GetDlgItem(IDC_D3D9DEVICE_COMBO)->EnableWindow(FALSE);
 	}
	UpdateData(TRUE);

	return TRUE;  // return TRUE unless you set the focus to a control
}
Exemplo n.º 12
0
BOOL CPPageTweaks::OnInitDialog()
{
    __super::OnInitDialog();

    SetHandCursor(m_hWnd, IDC_COMBO1);

    const CAppSettings& s = AfxGetAppSettings();

    m_nJumpDistS = s.nJumpDistS;
    m_nJumpDistM = s.nJumpDistM;
    m_nJumpDistL = s.nJumpDistL;
    m_fNotifySkype = s.bNotifySkype;

    m_fPreventMinimize = s.fPreventMinimize;

    m_fUseWin7TaskBar = s.fUseWin7TaskBar;
    if (!SysVersion::Is7OrLater()) {
        GetDlgItem(IDC_CHECK_WIN7)->EnableWindow(FALSE);
    }

    m_fUseSearchInFolder = s.fUseSearchInFolder;

    m_fUseTimeTooltip = s.fUseTimeTooltip;
    m_TimeTooltipPosition.AddString(ResStr(IDS_TIME_TOOLTIP_ABOVE));
    m_TimeTooltipPosition.AddString(ResStr(IDS_TIME_TOOLTIP_BELOW));
    m_TimeTooltipPosition.SetCurSel(s.nTimeTooltipPosition);
    m_TimeTooltipPosition.EnableWindow(m_fUseTimeTooltip);

    m_nOSDSize = s.nOSDSize;
    m_strOSDFont = s.strOSDFont;

    m_fFastSeek = s.bFastSeek;
    m_FastSeekMethod.AddString(ResStr(IDS_FASTSEEK_LATEST));
    m_FastSeekMethod.AddString(ResStr(IDS_FASTSEEK_NEAREST));
    m_FastSeekMethod.SetCurSel(s.eFastSeekMethod);

    m_fShowChapters = s.fShowChapters;

    m_bHideWindowedMousePointer = s.bHideWindowedMousePointer;

    m_fLCDSupport = s.fLCDSupport;

    m_FontType.Clear();
    m_FontSize.Clear();
    HDC dc = CreateDC(_T("DISPLAY"), nullptr, nullptr, nullptr);
    CAtlArray<CString> fntl;
    EnumFontFamilies(dc, nullptr, (FONTENUMPROC)EnumFontProc, (LPARAM)&fntl);
    DeleteDC(dc);
    for (size_t i = 0; i < fntl.GetCount(); ++i) {
        if (i > 0 && fntl[i - 1] == fntl[i]) {
            continue;
        }
        m_FontType.AddString(fntl[i]);
    }
    CorrectComboListWidth(m_FontType);
    int iSel = m_FontType.FindStringExact(0, m_strOSDFont);
    if (iSel == CB_ERR) {
        iSel = 0;
    }
    m_FontType.SetCurSel(iSel);

    CString str;
    for (int i = 10; i < 26; ++i) {
        str.Format(_T("%d"), i);
        m_FontSize.AddString(str);
        if (m_nOSDSize == i) {
            iSel = i;
        }
    }
    m_FontSize.SetCurSel(iSel - 10);

    EnableToolTips(TRUE);

    UpdateData(FALSE);

    return TRUE;  // return TRUE unless you set the focus to a control
    // EXCEPTION: OCX Property Pages should return FALSE
}
Exemplo n.º 13
0
BOOL CPPagePlayback::OnInitDialog()
{
    __super::OnInitDialog();

    SetHandCursor(m_hWnd, IDC_COMBO1);

    const CAppSettings& s = AfxGetAppSettings();

    m_volumectrl.SetRange(0, 100);
    m_volumectrl.SetTicFreq(10);
    m_balancectrl.SetRange(-100, 100);
    m_balancectrl.SetTicFreq(20);
    m_nVolume = m_oldVolume = s.nVolume;
    m_nBalance = s.nBalance;
    m_nVolumeStep = s.nVolumeStep;
    m_VolumeStepCtrl.SetRange32(1, 25);
    m_nSpeedStep = s.nSpeedStep;
    m_SpeedStepCtrl.SetPos32(m_nSpeedStep);
    m_SpeedStepCtrl.SetRange32(0, 100);
    m_iLoopForever = s.fLoopForever ? 1 : 0;
    m_nLoops = s.nLoops;
    m_iAfterPlayback = static_cast<int>(s.eAfterPlayback);
    m_iZoomLevel = s.iZoomLevel;
    m_iRememberZoomLevel = s.fRememberZoomLevel;
    m_nAutoFitFactor = s.nAutoFitFactor;
    m_AutoFitFactorCtrl.SetPos32(m_nAutoFitFactor);
    m_AutoFitFactorCtrl.SetRange32(25, 100);
    m_fAutoloadAudio = s.fAutoloadAudio;
    m_fEnableWorkerThreadForOpening = s.fEnableWorkerThreadForOpening;
    m_fReportFailedPins = s.fReportFailedPins;
    m_subtitlesLanguageOrder = s.strSubtitlesLanguageOrder;
    m_audiosLanguageOrder = s.strAudiosLanguageOrder;
    m_fAllowOverridingExternalSplitterChoice = s.bAllowOverridingExternalSplitterChoice;

    m_zoomlevelctrl.AddString(ResStr(IDS_ZOOM_50));
    m_zoomlevelctrl.AddString(ResStr(IDS_ZOOM_100));
    m_zoomlevelctrl.AddString(ResStr(IDS_ZOOM_200));
    m_zoomlevelctrl.AddString(ResStr(IDS_ZOOM_AUTOFIT));
    m_zoomlevelctrl.AddString(ResStr(IDS_ZOOM_AUTOFIT_LARGER));
    CorrectComboListWidth(m_zoomlevelctrl);

    m_afterPlayback.AddString(ResStr(IDS_AFTER_PLAYBACK_DO_NOTHING));
    m_afterPlayback.AddString(ResStr(IDS_AFTER_PLAYBACK_PLAY_NEXT));
    m_afterPlayback.AddString(ResStr(IDS_AFTER_PLAYBACK_REWIND));
    m_afterPlayback.AddString(ResStr(IDS_AFTER_PLAYBACK_MONITOROFF));
    m_afterPlayback.AddString(ResStr(IDS_AFTER_PLAYBACK_CLOSE));
    m_afterPlayback.AddString(ResStr(IDS_AFTER_PLAYBACK_EXIT));
    CorrectComboListWidth(m_afterPlayback);

    // set the spinner acceleration value
    UDACCEL accel = { 0, 10 };
    m_SpeedStepCtrl.SetAccel(1, &accel);

    EnableToolTips(TRUE);
    CreateToolTip();

    m_wndToolTip.AddTool(GetDlgItem(IDC_EDIT2), ResStr(IDS_LANG_PREF_EXAMPLE));
    m_wndToolTip.AddTool(GetDlgItem(IDC_EDIT3), ResStr(IDS_LANG_PREF_EXAMPLE));
    m_wndToolTip.AddTool(GetDlgItem(IDC_CHECK4), ResStr(IDS_OVERRIDE_EXT_SPLITTER_CHOICE));

    UpdateData(FALSE);

    return TRUE;  // return TRUE unless you set the focus to a control
    // EXCEPTION: OCX Property Pages should return FALSE
}
Exemplo n.º 14
0
BOOL CPPagePlayback::OnInitDialog()
{
	__super::OnInitDialog();

	SetHandCursor(m_hWnd, IDC_COMBO1);

	AppSettings& s = AfxGetAppSettings();

	m_volumectrl.SetRange(0, 100);
	m_volumectrl.SetTicFreq(10);
	m_balancectrl.SetRange(-100, 100);
	m_balancectrl.SetLineSize(2);
	m_balancectrl.SetPageSize(2);
	m_balancectrl.SetTicFreq(20);
	m_nVolume = m_oldVolume = s.nVolume;
	m_nBalance = s.nBalance;
	m_iLoopForever = s.fLoopForever?1:0;
	m_nLoops = s.nLoops;
	m_fRewind = s.fRewind;
	m_iRememberZoomLevel = s.fRememberZoomLevel;
	m_fEnableWorkerThreadForOpening = s.fEnableWorkerThreadForOpening;
	m_fReportFailedPins = s.fReportFailedPins;
	m_subtitlesLanguageOrder = s.strSubtitlesLanguageOrder;
	m_audiosLanguageOrder = s.strAudiosLanguageOrder;

	m_zoomlevelctrl.AddString(L"50%");
	m_zoomlevelctrl.AddString(L"100%");
	m_zoomlevelctrl.AddString(L"200%");
	m_zoomlevelctrl.AddString(ResStr(IDS_ZOOM_AUTOFIT));
	CorrectComboListWidth(m_zoomlevelctrl);
	m_iZoomLevel = s.iZoomLevel;

	for (int idx = 1; idx <= 10; idx++) {
		CString str; str.Format(_T("%d"), idx);
		m_nVolumeStepCtrl.AddString(str);
	}

	m_nVolumeStep = s.nVolumeStep - 1;

	m_nSpeedStepCtrl.AddString(ResStr(IDS_AG_AUTO));
	m_nSpeedStepCtrl.SetItemData(m_nSpeedStepCtrl.GetCount() - 1, 0);
	m_nSpeedStepCtrl.AddString(L"0.1");
	m_nSpeedStepCtrl.SetItemData(m_nSpeedStepCtrl.GetCount() - 1, 10);
	m_nSpeedStepCtrl.AddString(L"0.2");
	m_nSpeedStepCtrl.SetItemData(m_nSpeedStepCtrl.GetCount() - 1, 20);
	m_nSpeedStepCtrl.AddString(L"0.25");
	m_nSpeedStepCtrl.SetItemData(m_nSpeedStepCtrl.GetCount() - 1, 25);
	m_nSpeedStepCtrl.AddString(L"0.5");
	m_nSpeedStepCtrl.SetItemData(m_nSpeedStepCtrl.GetCount() - 1, 50);
	m_nSpeedStepCtrl.AddString(L"1.0");
	m_nSpeedStepCtrl.SetItemData(m_nSpeedStepCtrl.GetCount() - 1, 100);

	for (int i = 0; i < m_nSpeedStepCtrl.GetCount(); i++) {
		if (m_nSpeedStepCtrl.GetItemData(i) == s.nSpeedStep) {
			m_nSpeedStepCtrl.SetCurSel(i);
			break;
		}
	}

	m_fUseInternalSelectTrackLogic = s.fUseInternalSelectTrackLogic;

	CString dlgText;
	GetDlgItemText(IDC_STATIC2, dlgText);
	if (!dlgText.IsEmpty()) {
		dlgText = _T("     ") + dlgText;
		SetDlgItemText(IDC_STATIC2, dlgText);
	}

	UpdateData(FALSE);

	return TRUE;
}
Exemplo n.º 15
0
bool CMpcAudioRendererSettingsWnd::OnActivate()
{
	ASSERT(IPP_FONTSIZE == 13);
	const int h20 = IPP_SCALE(20);
	const int h30 = IPP_SCALE(30);
	DWORD dwStyle = WS_VISIBLE | WS_CHILD | WS_TABSTOP;
	CPoint p(10, 10);

	m_txtWasapiMode.Create(ResStr(IDS_ARS_WASAPI_MODE), WS_VISIBLE|WS_CHILD, CRect(p, CSize(IPP_SCALE(320), m_fontheight)), this, (UINT)IDC_STATIC);
	p.y += h20;
	m_cbWasapiMode.Create(WS_VISIBLE|WS_CHILD|CBS_DROPDOWNLIST|WS_VSCROLL, CRect(p, CSize(IPP_SCALE(320), 200)), this, IDC_PP_WASAPI_MODE);
	m_cbWasapiMode.AddString(L"Exclusive Mode");
	m_cbWasapiMode.AddString(L"Shared Mode");
	p.y += h30;
	m_cbUseBitExactOutput.Create(ResStr(IDS_ARS_BITEXACT_OUTPUT), WS_VISIBLE|WS_CHILD|BS_AUTOCHECKBOX|BS_LEFTTEXT, CRect(p, CSize(IPP_SCALE(320), m_fontheight)), this, IDC_PP_USE_BITEXACT_OUTPUT);
	p.y += h20;
	m_cbUseSystemLayoutChannels.Create(ResStr(IDS_ARS_SYSTEM_LAYOUT_CHANNELS), WS_VISIBLE|WS_CHILD|BS_AUTOCHECKBOX|BS_LEFTTEXT, CRect(p, CSize(IPP_SCALE(320), m_fontheight)), this, IDC_PP_USE_SYSTEM_LAYOUT_CHANNELS);
	p.y += h30;

	m_txtSoundDevice.Create(ResStr(IDS_ARS_SOUND_DEVICE), WS_VISIBLE|WS_CHILD, CRect(p, CSize(IPP_SCALE(320), m_fontheight)), this, (UINT)IDC_STATIC);
	p.y += h20;
	m_cbSoundDevice.Create(WS_VISIBLE|WS_CHILD|CBS_DROPDOWNLIST|WS_VSCROLL, CRect(p, CSize(IPP_SCALE(320), 200)), this, IDC_PP_SOUND_DEVICE);

	HMODULE hModule = LoadLibrary(L"dsound.dll");
	if (hModule) {
		HRESULT (__stdcall * pDirectSoundEnumerate)(__in LPDSENUMCALLBACKW pDSEnumCallback, __in_opt LPVOID pContext);
		(FARPROC &)pDirectSoundEnumerate = GetProcAddress(hModule, "DirectSoundEnumerateW");
		if (pDirectSoundEnumerate) {
			pDirectSoundEnumerate((LPDSENUMCALLBACK)DSEnumProc, (VOID*)&m_cbSoundDevice);
		}

		FreeLibrary(hModule);
	}

	if (m_pMAR) {
		if (m_cbSoundDevice.GetCount() > 0) {
			int idx = m_cbSoundDevice.FindString(0, m_pMAR->GetSoundDevice());
			if (idx < 0) {
				m_cbSoundDevice.SetCurSel(0);
			} else {
				m_cbSoundDevice.SetCurSel(m_cbSoundDevice.FindString(0, m_pMAR->GetSoundDevice()));
			}
		}
		m_cbWasapiMode.SetCurSel(m_pMAR->GetWasapiMode());
		m_cbUseBitExactOutput.SetCheck(m_pMAR->GetBitExactOutput());
		m_cbUseSystemLayoutChannels.SetCheck(m_pMAR->GetSystemLayoutChannels());
	}

	for (CWnd* pWnd = GetWindow(GW_CHILD); pWnd; pWnd = pWnd->GetNextWindow()) {
		pWnd->SetFont(&m_font, FALSE);
	}

	CorrectComboListWidth(m_cbSoundDevice);

	SetClassLongPtr(m_hWnd, GCLP_HCURSOR, (long) AfxGetApp()->LoadStandardCursor(IDC_ARROW));
	SetClassLongPtr(GetDlgItem(IDC_PP_SOUND_DEVICE)->m_hWnd, GCLP_HCURSOR, (long) AfxGetApp()->LoadStandardCursor(IDC_HAND));

	OnClickedWasapiMode();

	return true;
}
Exemplo n.º 16
0
bool CMPCVideoDecSettingsWnd::OnActivate()
{
    ASSERT(IPP_FONTSIZE == 13);
    const int h20 = IPP_SCALE(20);
    const int h25 = IPP_SCALE(25);
    DWORD dwStyle = WS_VISIBLE | WS_CHILD | WS_TABSTOP;
    CPoint p(10, 10);
    GUID* DxvaGui = NULL;

#if HAS_FFMPEG_VIDEO_DECODERS
    m_grpFFMpeg.Create(ResStr(IDS_VDF_FFSETTINGS), WS_VISIBLE | WS_CHILD | BS_GROUPBOX, CRect(p + CPoint(-5, 0), CSize(IPP_SCALE(350), h20 + h25 * 4 + h20)), this, (UINT)IDC_STATIC);
    p.y += h20;

    // Decoding threads
    m_txtThreadNumber.Create(ResStr(IDS_VDF_THREADNUMBER), WS_VISIBLE | WS_CHILD, CRect(p, CSize(IPP_SCALE(220), m_fontheight)), this, (UINT)IDC_STATIC);
    m_cbThreadNumber.Create(dwStyle | CBS_DROPDOWNLIST | WS_VSCROLL, CRect(p + CPoint(IPP_SCALE(230), -4), CSize(IPP_SCALE(110), 200)), this, IDC_PP_THREAD_NUMBER);
    m_cbThreadNumber.AddString(ResStr(IDS_VDF_IDCT_AUTO));
    CString ThreadNumberStr;
    for (int i = 0; i < 16; i++) {
        ThreadNumberStr.Format(_T("%d"), i + 1);
        m_cbThreadNumber.AddString(ThreadNumberStr);
    }
    p.y += h25;

#if INTERNAL_DECODER_H264
    // H264 deblocking mode
    m_txtDiscardMode.Create(ResStr(IDS_VDF_SKIPDEBLOCK), WS_VISIBLE | WS_CHILD, CRect(p, CSize(IPP_SCALE(220), m_fontheight)), this, (UINT)IDC_STATIC);
    m_cbDiscardMode.Create(dwStyle | CBS_DROPDOWNLIST | WS_VSCROLL, CRect(p + CPoint(IPP_SCALE(230), -4), CSize(IPP_SCALE(110), 200)), this, IDC_PP_DISCARD_MODE);
    m_cbDiscardMode.AddString(ResStr(IDS_VDF_DBLK_NONE));
    m_cbDiscardMode.AddString(ResStr(IDS_VDF_DBLK_DEFAULT));
    m_cbDiscardMode.AddString(ResStr(IDS_VDF_DBLK_NONREF));
    m_cbDiscardMode.AddString(ResStr(IDS_VDF_DBLK_BIDIR));
    m_cbDiscardMode.AddString(ResStr(IDS_VDF_DBLK_NONKFRM));
    m_cbDiscardMode.AddString(ResStr(IDS_VDF_DBLK_ALL));
#endif /* INTERNAL_DECODER_H264 */
    p.y += h25;

    // Error recognition
    m_txtErrorRecognition.Create(ResStr(IDS_VDF_ERROR_RECOGNITION), WS_VISIBLE | WS_CHILD, CRect(p, CSize(IPP_SCALE(220), m_fontheight)), this, (UINT)IDC_STATIC);
    m_cbErrorRecognition.Create(dwStyle | CBS_DROPDOWNLIST | WS_VSCROLL, CRect(p + CPoint(IPP_SCALE(230), -4), CSize(IPP_SCALE(110), 200)), this, IDC_PP_DISCARD_MODE);
    m_cbErrorRecognition.AddString(ResStr(IDS_VDF_ERR_CAREFUL));
    m_cbErrorRecognition.AddString(ResStr(IDS_VDF_ERR_COMPLIANT));
    m_cbErrorRecognition.AddString(ResStr(IDS_VDF_ERR_AGGRESSIVE));
    p.y += h25;

    // IDCT Algorithm
    m_txtIDCTAlgo.Create(ResStr(IDS_VDF_IDCT_ALGO), WS_VISIBLE | WS_CHILD, CRect(p, CSize(IPP_SCALE(220), m_fontheight)), this, (UINT)IDC_STATIC);
    m_cbIDCTAlgo.Create(dwStyle | CBS_DROPDOWNLIST | WS_VSCROLL, CRect(p + CPoint(IPP_SCALE(230), -4), CSize(IPP_SCALE(110), 200)), this, IDC_PP_DISCARD_MODE);
    m_cbIDCTAlgo.AddString(ResStr(IDS_VDF_IDCT_AUTO));
    m_cbIDCTAlgo.AddString(ResStr(IDS_VDF_IDCT_LIBMPEG2));
    m_cbIDCTAlgo.AddString(ResStr(IDS_VDF_IDCT_SIMPLE_MMX));
    m_cbIDCTAlgo.AddString(ResStr(IDS_VDF_IDCT_XVID));
    m_cbIDCTAlgo.AddString(ResStr(IDS_VDF_IDCT_SIMPLE));
    p.y += h25;

    m_cbARMode.Create(ResStr(IDS_VDF_AR_MODE), dwStyle | BS_AUTOCHECKBOX | BS_LEFTTEXT, CRect(p, CSize(IPP_SCALE(340), m_fontheight)), this, IDC_PP_AR);
    m_cbARMode.SetCheck(FALSE);
    p.y += h25;
#endif /* HAS_FFMPEG_VIDEO_DECODERS */

    m_grpDXVA.Create(ResStr(IDS_VDF_DXVA_SETTING), WS_VISIBLE | WS_CHILD | BS_GROUPBOX, CRect(p + CPoint(-5, 0), CSize(IPP_SCALE(350), h20 + h25 + h20 * 3 + m_fontheight)), this, (UINT)IDC_STATIC);
    p.y += h20;

    // DXVA Compatibility check
    m_txtDXVACompatibilityCheck.Create(ResStr(IDS_VDF_DXVACOMPATIBILITY), WS_VISIBLE | WS_CHILD, CRect(p, CSize(IPP_SCALE(225), m_fontheight)), this, (UINT)IDC_STATIC);
    m_cbDXVACompatibilityCheck.Create(dwStyle | CBS_DROPDOWNLIST | WS_VSCROLL, CRect(p + CPoint(IPP_SCALE(230), -4), CSize(IPP_SCALE(110), 200)), this, IDC_PP_DXVA_CHECK);
    m_cbDXVACompatibilityCheck.AddString(ResStr(IDS_VDF_DXVA_FULLCHECK));
    m_cbDXVACompatibilityCheck.AddString(ResStr(IDS_VDF_DXVA_SKIP_LEVELCHECK));
    m_cbDXVACompatibilityCheck.AddString(ResStr(IDS_VDF_DXVA_SKIP_REFCHECK));
    m_cbDXVACompatibilityCheck.AddString(ResStr(IDS_VDF_DXVA_SKIP_ALLCHECK));
    p.y += h25;

    m_cbDXVA_SD.Create(ResStr(IDS_VDF_DXVA_SD), dwStyle | BS_AUTOCHECKBOX | BS_LEFTTEXT, CRect(p, CSize(IPP_SCALE(340), m_fontheight)), this, IDC_PP_DXVA_SD);
    m_cbDXVA_SD.SetCheck(FALSE);
    p.y += h20;

    // DXVA mode
    m_txtDXVAMode.Create(ResStr(IDS_VDF_DXVA_MODE), WS_VISIBLE | WS_CHILD, CRect(p, CSize(IPP_SCALE(120), m_fontheight)), this, (UINT)IDC_STATIC);
    m_edtDXVAMode.Create(WS_CHILD | WS_VISIBLE | WS_DISABLED, CRect(p + CPoint(IPP_SCALE(120), 0), CSize(IPP_SCALE(220), m_fontheight)), this, 0);
    p.y += h20;

    // Video card description
    m_txtVideoCardDescription.Create(ResStr(IDS_VDF_VIDEOCARD), WS_VISIBLE | WS_CHILD, CRect(p, CSize(IPP_SCALE(120), m_fontheight)), this, (UINT)IDC_STATIC);
    m_edtVideoCardDescription.Create(ES_MULTILINE | WS_CHILD | WS_VISIBLE | WS_DISABLED, CRect(p + CPoint(IPP_SCALE(120), 0), CSize(IPP_SCALE(220), m_fontheight * 2)), this, 0);
    m_edtVideoCardDescription.SetWindowText(m_pMDF->GetVideoCardDescription());

    DxvaGui = m_pMDF->GetDXVADecoderGuid();
    if (DxvaGui != NULL) {
        CString DXVAMode = GetDXVAMode(DxvaGui);
        m_edtDXVAMode.SetWindowText(DXVAMode);
    } else {
        m_txtDXVAMode.ShowWindow(SW_HIDE);
        m_edtDXVAMode.ShowWindow(SW_HIDE);
    }

    for (CWnd* pWnd = GetWindow(GW_CHILD); pWnd; pWnd = pWnd->GetNextWindow()) {
        pWnd->SetFont(&m_font, FALSE);
    }

    CorrectComboListWidth(m_cbDXVACompatibilityCheck);
#if INTERNAL_DECODER_H264
    CorrectComboListWidth(m_cbDiscardMode);
#endif

    if (m_pMDF) {
#if HAS_FFMPEG_VIDEO_DECODERS
#if INTERNAL_DECODER_H264
        m_cbThreadNumber.SetCurSel(m_pMDF->GetThreadNumber());
        m_cbDiscardMode.SetCurSel(FindDiscardIndex(m_pMDF->GetDiscardMode()));
#endif
        m_cbErrorRecognition.SetCurSel(FindErrRecognitionIndex(m_pMDF->GetErrorRecognition()));
        m_cbIDCTAlgo.SetCurSel(m_pMDF->GetIDCTAlgo());

        m_cbARMode.SetCheck(m_pMDF->GetARMode());
#endif /* HAS_FFMPEG_VIDEO_DECODERS */

        m_cbDXVACompatibilityCheck.SetCurSel(m_pMDF->GetDXVACheckCompatibility());
        m_cbDXVA_SD.SetCheck(m_pMDF->GetDXVA_SD());
    }

    return true;
}
Exemplo n.º 17
0
bool CMPCVideoDecSettingsWnd::OnActivate()
{
	int		nPosY	= 10;
	GUID*	DxvaGui = NULL;

#if HAS_FFMPEG_VIDEO_DECODERS
	m_grpFFMpeg.Create (ResStr (IDS_VDF_FFSETTINGS), WS_VISIBLE|WS_CHILD | BS_GROUPBOX, CRect (5,  nPosY, 350, nPosY+150), this, (UINT)IDC_STATIC);

	// Decoding threads
	nPosY += VERTICAL_SPACING;
	m_txtThreadNumber.Create (ResStr (IDS_VDF_THREADNUMBER), WS_VISIBLE|WS_CHILD, CRect (LEFT_SPACING,  nPosY, 220, nPosY+15), this, (UINT)IDC_STATIC);
	m_cbThreadNumber.Create  (WS_VISIBLE|WS_CHILD|CBS_DROPDOWNLIST|WS_VSCROLL, CRect (230,  nPosY-4, 345, nPosY+90), this, IDC_PP_THREAD_NUMBER);
	m_cbThreadNumber.AddString(ResStr(IDS_VDF_IDCT_AUTO));
	CString ThreadNumberStr;
	for (int i=0; i<16; i++) {
		ThreadNumberStr.Format(_T("%d"), i+1);
		m_cbThreadNumber.AddString(ThreadNumberStr);
	}

#if INTERNAL_DECODER_H264
	// H264 deblocking mode
	nPosY += VERTICAL_SPACING;
	m_txtDiscardMode.Create (ResStr (IDS_VDF_SKIPDEBLOCK), WS_VISIBLE|WS_CHILD, CRect (LEFT_SPACING,  nPosY, 220, nPosY+15), this, (UINT)IDC_STATIC);
	m_cbDiscardMode.Create  (WS_VISIBLE|WS_CHILD|CBS_DROPDOWNLIST|WS_VSCROLL, CRect (230,  nPosY-4, 345, nPosY+90), this, IDC_PP_DISCARD_MODE);
	m_cbDiscardMode.AddString (ResStr (IDS_VDF_DBLK_NONE));
	m_cbDiscardMode.AddString (ResStr (IDS_VDF_DBLK_DEFAULT));
	m_cbDiscardMode.AddString (ResStr (IDS_VDF_DBLK_NONREF));
	m_cbDiscardMode.AddString (ResStr (IDS_VDF_DBLK_BIDIR));
	m_cbDiscardMode.AddString (ResStr (IDS_VDF_DBLK_NONKFRM));
	m_cbDiscardMode.AddString (ResStr (IDS_VDF_DBLK_ALL));
#endif /* INTERNAL_DECODER_H264 */

	// Error recognition
	nPosY += VERTICAL_SPACING;
	m_txtErrorRecognition.Create (ResStr (IDS_VDF_ERROR_RECOGNITION), WS_VISIBLE|WS_CHILD, CRect (LEFT_SPACING,  nPosY, 220, nPosY+15), this, (UINT)IDC_STATIC);
	m_cbErrorRecognition.Create  (WS_VISIBLE|WS_CHILD|CBS_DROPDOWNLIST|WS_VSCROLL, CRect (230,  nPosY-4, 345, nPosY+90), this, IDC_PP_DISCARD_MODE);
	m_cbErrorRecognition.AddString (ResStr (IDS_VDF_ERR_CAREFUL));
	m_cbErrorRecognition.AddString (ResStr (IDS_VDF_ERR_COMPLIANT));
	m_cbErrorRecognition.AddString (ResStr (IDS_VDF_ERR_AGGRESSIVE));

	// IDCT Algo
	nPosY += VERTICAL_SPACING;
	m_txtIDCTAlgo.Create (ResStr (IDS_VDF_IDCT_ALGO), WS_VISIBLE|WS_CHILD, CRect (LEFT_SPACING,  nPosY, 220, nPosY+15), this, (UINT)IDC_STATIC);
	m_cbIDCTAlgo.Create  (WS_VISIBLE|WS_CHILD|CBS_DROPDOWNLIST|WS_VSCROLL, CRect (230,  nPosY-4, 345, nPosY+90), this, IDC_PP_DISCARD_MODE);
	m_cbIDCTAlgo.AddString (ResStr (IDS_VDF_IDCT_AUTO));
	m_cbIDCTAlgo.AddString (ResStr (IDS_VDF_IDCT_LIBMPEG2));
	m_cbIDCTAlgo.AddString (ResStr (IDS_VDF_IDCT_SIMPLE_MMX));
	m_cbIDCTAlgo.AddString (ResStr (IDS_VDF_IDCT_XVID));
	m_cbIDCTAlgo.AddString (ResStr (IDS_VDF_IDCT_SIMPLE));

	nPosY += VERTICAL_SPACING;
	m_cbARMode.Create (ResStr (IDS_VDF_AR_MODE), WS_VISIBLE|WS_CHILD|BS_AUTOCHECKBOX|BS_LEFTTEXT, CRect (LEFT_SPACING,  nPosY, 345, nPosY+15), this, IDC_PP_AR);
	m_cbARMode.SetCheck(FALSE);

	nPosY = 170;
#endif /* HAS_FFMPEG_VIDEO_DECODERS */

	m_grpDXVA.Create   (ResStr (IDS_VDF_DXVA_SETTING),   WS_VISIBLE|WS_CHILD | BS_GROUPBOX, CRect (5, nPosY, 350, nPosY+135), this, (UINT)IDC_STATIC);

	// DXVA Compatibility check
	nPosY += VERTICAL_SPACING;
	m_txtDXVACompatibilityCheck.Create (ResStr (IDS_VDF_DXVACOMPATIBILITY), WS_VISIBLE|WS_CHILD, CRect (LEFT_SPACING,  nPosY, 225, nPosY+15), this, (UINT)IDC_STATIC);
	m_cbDXVACompatibilityCheck.Create  (WS_VISIBLE|WS_CHILD|CBS_DROPDOWNLIST|WS_VSCROLL, CRect (230,  nPosY-4, 345, nPosY+90), this, IDC_PP_DXVA_CHECK);
	m_cbDXVACompatibilityCheck.AddString(ResStr(IDS_VDF_DXVA_FULLCHECK));
	m_cbDXVACompatibilityCheck.AddString(ResStr(IDS_VDF_DXVA_SKIP_LEVELCHECK));
	m_cbDXVACompatibilityCheck.AddString(ResStr(IDS_VDF_DXVA_SKIP_REFCHECK));
	m_cbDXVACompatibilityCheck.AddString(ResStr(IDS_VDF_DXVA_SKIP_ALLCHECK));

	nPosY += VERTICAL_SPACING;
	m_cbDXVA_SD.Create (ResStr (IDS_VDF_DXVA_SD), WS_VISIBLE|WS_CHILD|BS_AUTOCHECKBOX|BS_LEFTTEXT, CRect (LEFT_SPACING,  nPosY, 345, nPosY+15), this, IDC_PP_DXVA_SD);
	m_cbDXVA_SD.SetCheck(FALSE);

	// DXVA mode
	nPosY += VERTICAL_SPACING;
	m_txtDXVAMode.Create (ResStr (IDS_VDF_DXVA_MODE), WS_VISIBLE|WS_CHILD, CRect (LEFT_SPACING,  nPosY, 120, nPosY+15), this, (UINT)IDC_STATIC);
	m_edtDXVAMode.Create (WS_CHILD|WS_VISIBLE|WS_DISABLED, CRect (120,  nPosY, 345, nPosY+20), this, 0);

	// Video card description
	nPosY += VERTICAL_SPACING;
	m_txtVideoCardDescription.Create (ResStr (IDS_VDF_VIDEOCARD), WS_VISIBLE|WS_CHILD, CRect (LEFT_SPACING,  nPosY, 120, nPosY+15), this, (UINT)IDC_STATIC);
	m_edtVideoCardDescription.Create (ES_MULTILINE|WS_CHILD|WS_VISIBLE|WS_DISABLED, CRect (120,  nPosY, 345, nPosY+30), this, 0);
	m_edtVideoCardDescription.SetWindowText (m_pMDF->GetVideoCardDescription());


	DxvaGui = m_pMDF->GetDXVADecoderGuid();
	if (DxvaGui != NULL) {
		CString DXVAMode = GetDXVAMode (DxvaGui);
		m_edtDXVAMode.SetWindowText (DXVAMode);
	} else {
		m_txtDXVAMode.ShowWindow (SW_HIDE);
		m_edtDXVAMode.ShowWindow (SW_HIDE);
	}

	for (CWnd* pWnd = GetWindow(GW_CHILD); pWnd; pWnd = pWnd->GetNextWindow()) {
		pWnd->SetFont(&m_font, FALSE);
	}

	CorrectComboListWidth(m_cbDXVACompatibilityCheck);
#if INTERNAL_DECODER_H264
	CorrectComboListWidth(m_cbDiscardMode);
#endif

	if (m_pMDF) {
#if HAS_FFMPEG_VIDEO_DECODERS
#if INTERNAL_DECODER_H264
		m_cbThreadNumber.SetCurSel		(m_pMDF->GetThreadNumber());
		m_cbDiscardMode.SetCurSel		(FindDiscardIndex (m_pMDF->GetDiscardMode()));
#endif
		m_cbErrorRecognition.SetCurSel	(FindErrRecognitionIndex (m_pMDF->GetErrorRecognition()));
		m_cbIDCTAlgo.SetCurSel			(m_pMDF->GetIDCTAlgo());

		m_cbARMode.SetCheck(m_pMDF->GetARMode());
#endif /* HAS_FFMPEG_VIDEO_DECODERS */

		m_cbDXVACompatibilityCheck.SetCurSel(m_pMDF->GetDXVACheckCompatibility());
		m_cbDXVA_SD.SetCheck(m_pMDF->GetDXVA_SD());
	}

	return true;
}