12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- // SelectDSP.cpp : implementation file
- //
- #include "stdafx.h"
- #include "HKVision.h"
- #include "SelectDSP.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CSelectDSP dialog
- CSelectDSP::CSelectDSP(CWnd* pParent /*=NULL*/)
- : CDialog(CSelectDSP::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CSelectDSP)
- m_ImageFile = _T("");
- m_LogFile = _T("");
- //}}AFX_DATA_INIT
- }
- void CSelectDSP::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CSelectDSP)
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CSelectDSP, CDialog)
- //{{AFX_MSG_MAP(CSelectDSP)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CSelectDSP message handlers
- void CSelectDSP::DSPPreset(BOOLEAN *bPreset, int iNumberOfDSPs)
- {
- ZeroMemory(m_bDSPPreset, sizeof(m_bDSPPreset));
- for( int i = 0; i < iNumberOfDSPs; i++){
- m_bDSPPreset[i] = bPreset[i];
- }
- m_iTotalDSPs = iNumberOfDSPs;
- }
- BOOL CSelectDSP::OnInitDialog()
- {
- CDialog::OnInitDialog();
- for(int i =0; i < MAX_DSPS_SUPPORT; i++)
- GetDlgItem(IDC_CHECK1 + i)->EnableWindow(FALSE);
-
- // TODO: Add extra initialization here
- for( i =0; i < m_iTotalDSPs; i++){
- GetDlgItem(IDC_CHECK1 + i)->EnableWindow(TRUE);
- if(m_bDSPPreset[i])
- CheckDlgButton(IDC_CHECK1 + i, BST_CHECKED);
-
- }
-
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }
- void CSelectDSP::GetDSPsChoiced(BOOLEAN *bList)
- {
- for(int i = 0; i < m_iTotalDSPs; i++){
- bList[i] = m_bDSPPreset[i];
- }
- }
- void CSelectDSP::OnOK()
- {
- // TODO: Add extra validation here
- for(int i =0; i < m_iTotalDSPs; i++){
- m_bDSPPreset[i] = IsDlgButtonChecked(IDC_CHECK1 + i);
- }
-
- CDialog::OnOK();
- }
|