home *** CD-ROM | disk | FTP | other *** search
- // TestDevice.cpp : implementation file
- //
-
- #include "stdafx.h"
- #include "TestVC.h"
- #include "TestDevice.h"
- #include "TestSheet.h"
-
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
- // CTestDevice property page
-
- IMPLEMENT_DYNCREATE(CTestDevice, CPropertyPage)
-
- CTestDevice::CTestDevice() : CPropertyPage(CTestDevice::IDD)
- {
- //{{AFX_DATA_INIT(CTestDevice)
- //}}AFX_DATA_INIT
- }
-
- CTestDevice::~CTestDevice()
- {
- }
-
- void CTestDevice::DoDataExchange(CDataExchange* pDX)
- {
- CPropertyPage::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CTestDevice)
- DDX_Control(pDX, IDC_CHECK2, m_fplay);
- DDX_Control(pDX, IDC_CHECK1, m_frecord);
- DDX_Control(pDX, IDC_COMBO2, m_play);
- DDX_Control(pDX, IDC_COMBO1, m_record);
- //}}AFX_DATA_MAP
- }
-
-
- BEGIN_MESSAGE_MAP(CTestDevice, CPropertyPage)
- //{{AFX_MSG_MAP(CTestDevice)
- ON_CBN_SELCHANGE(IDC_COMBO1, OnSelchangeCombo1)
- ON_CBN_SELCHANGE(IDC_COMBO2, OnSelchangeCombo2)
- ON_BN_CLICKED(IDC_CHECK1, OnCheck1)
- ON_BN_CLICKED(IDC_CHECK2, OnCheck2)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
- /////////////////////////////////////////////////////////////////////////////
- // CTestDevice message handlers
-
- BOOL CTestDevice::OnInitDialog()
- {
- CPropertyPage::OnInitDialog();
-
- CPropertySheet* pSheet = STATIC_DOWNCAST(CPropertySheet, GetParent());
- CTestSheet* pts = DYNAMIC_DOWNCAST(CTestSheet,pSheet);
- m_player=pts->m_player;
-
- short i,cdev;
-
- cdev=m_player->GetDevInput();
- for(i=0;i<=m_player->GetDevInputMax();i++) {
- m_player->SetDevInput(i);
- m_record.InsertString(i,m_player->GetDevInputName());
- }
- m_player->SetDevInput(cdev);
- m_record.SetCurSel(m_player->GetDevInput());
-
- cdev=m_player->GetDevOutput();
- for(i=0;i<=m_player->GetDevOutputMax();i++) {
- m_player->SetDevOutput(i);
- m_play.InsertString(i,m_player->GetDevOutputName());
- }
- m_player->SetDevOutput(cdev);
- m_play.SetCurSel(m_player->GetDevOutput());
-
- m_frecord.SetCheck(m_player->GetFlgEndRecordBlock());
- m_fplay.SetCheck(m_player->GetFlgSelectedPlay());
-
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }
-
- void CTestDevice::OnSelchangeCombo1()
- {
- SetModified();
- }
-
- void CTestDevice::OnSelchangeCombo2()
- {
- SetModified();
- }
-
- void CTestDevice::OnCheck1()
- {
- SetModified();
- }
-
- void CTestDevice::OnCheck2()
- {
- SetModified();
- }
-
- void CTestDevice::OnOK()
- {
- m_player->SetDevInput(m_record.GetCurSel());
- m_player->SetDevOutput(m_play.GetCurSel());
- m_player->SetFlgEndRecordBlock(m_frecord.GetCheck());
- m_player->SetFlgSelectedPlay(m_fplay.GetCheck());
-
- CPropertyPage::OnOK();
- }
-