You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
120 lines
2.7 KiB
120 lines
2.7 KiB
//----------------------------------------------------------------------------
|
|
// Laser Guard Ltd.
|
|
// Copyright © 2000-2002. All Rights Reserved.
|
|
// Version 1.0 01/01/2000
|
|
// Last modification: 08/10/2003
|
|
// PROJECT:
|
|
// SUBSYSTEM:
|
|
// FILE: PropVideoDlg.cpp
|
|
// AUTHOR: Sergey Chizhevskiy
|
|
// OVERVIEW
|
|
// ~~~~~~~~
|
|
// Source file of PropVideoDlg.cpp
|
|
//----------------------------------------------------------------------------
|
|
// PropVideoDlg.cpp : implementation file
|
|
//
|
|
|
|
#include "stdafx.h"
|
|
#include "setuplgs.h"
|
|
#include "PropVideoDlg.h"
|
|
#include "..\..\LgLib\Video\LgDirectShowVideoInputEnum.h"
|
|
|
|
#ifdef _DEBUG
|
|
#define new DEBUG_NEW
|
|
#undef THIS_FILE
|
|
static char THIS_FILE[] = __FILE__;
|
|
#endif
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CPropVideoDlg dialog
|
|
|
|
|
|
CPropVideoDlg::CPropVideoDlg(CWnd* pParent /*=NULL*/)
|
|
: CDialog(CPropVideoDlg::IDD, pParent)
|
|
{
|
|
//{{AFX_DATA_INIT(CPropVideoDlg)
|
|
//}}AFX_DATA_INIT
|
|
m_pDevice = NULL;
|
|
}
|
|
|
|
|
|
void CPropVideoDlg::DoDataExchange(CDataExchange* pDX)
|
|
{
|
|
CDialog::DoDataExchange(pDX);
|
|
//{{AFX_DATA_MAP(CPropVideoDlg)
|
|
DDX_Control(pDX, IDC_COMBO_STANDARD, m_Standard);
|
|
DDX_Control(pDX, IDC_COMBO_TYPE, m_Type);
|
|
//}}AFX_DATA_MAP
|
|
}
|
|
|
|
|
|
BEGIN_MESSAGE_MAP(CPropVideoDlg, CDialog)
|
|
//{{AFX_MSG_MAP(CPropVideoDlg)
|
|
//}}AFX_MSG_MAP
|
|
END_MESSAGE_MAP()
|
|
|
|
int CPropVideoDlg::DoModal( COFDevice *pDevice )
|
|
{
|
|
m_pDevice = (COFDeviceVideoIn*)pDevice;
|
|
return CDialog::DoModal();
|
|
}
|
|
|
|
|
|
BOOL CPropVideoDlg::OnInitDialog()
|
|
{
|
|
CDialog::OnInitDialog();
|
|
|
|
ASSERT( m_pDevice );
|
|
|
|
m_Type.AddString( _T("~GENERIC~") );
|
|
m_Type.SetCurSel( 0 );
|
|
|
|
CLgDirectShowVideoInputEnum vie;
|
|
if( vie.Create() )
|
|
{
|
|
for( INT i = 0; i < vie.GetVideoInputDeviceCount(); i++ )
|
|
{
|
|
CLgDirectShowVideoInputEnum::DSVID_INFO VideoInfo;
|
|
if( vie.GetVideoInputDeviceInfo( i, &VideoInfo ) )
|
|
{
|
|
m_Type.AddString( VideoInfo.pFrendlyName );
|
|
}
|
|
}
|
|
}
|
|
|
|
m_Type.SetCurSel( m_pDevice->m_nSubType );
|
|
|
|
m_Standard.AddString( "PAL" );
|
|
m_Standard.AddString( "NTSC" );
|
|
|
|
m_Standard.SetCurSel( m_pDevice->m_nStandard );
|
|
|
|
return TRUE;
|
|
}
|
|
|
|
void CPropVideoDlg::OnOK()
|
|
{
|
|
int nSubType = m_pDevice->m_nSubType;
|
|
int nStandard = m_pDevice->m_nStandard;
|
|
|
|
#ifndef SETUP_DEMO_VERSION
|
|
nSubType = m_Type.GetCurSel();
|
|
nStandard = m_Standard.GetCurSel();
|
|
#endif
|
|
|
|
BOOL bChange = FALSE;
|
|
if( m_pDevice->m_nSubType != nSubType )
|
|
{
|
|
m_pDevice->m_nSubType = nSubType;
|
|
bChange = TRUE;
|
|
}
|
|
|
|
if( m_pDevice->m_nStandard != nStandard )
|
|
{
|
|
m_pDevice->m_nStandard = nStandard;
|
|
bChange = TRUE;
|
|
}
|
|
|
|
if( bChange ) CDialog::OnOK();
|
|
else CDialog::OnCancel();
|
|
}
|