|
|
//----------------------------------------------------------------------------
// Laser Guard Ltd.
// Copyright � 2000-2002. All Rights Reserved.
// Version 1.0 01/01/2000
// Last modification: 08/10/2003
// PROJECT:
// SUBSYSTEM:
// FILE: BoardReceiverSeekDlg.cpp
// AUTHOR: Sergey Chizhevskiy
// OVERVIEW
// ~~~~~~~~
// Source file of BoardReceiverSeekDlg.cpp
//----------------------------------------------------------------------------
// BoardReceiverSeekDlg.cpp : implementation file
//
#include "stdafx.h"
#include "boardreceiver.h"
#include "BoardReceiverSeekDlg.h"
/*
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;#endif
*//////////////////////////////////////////////////////////////////////////////
// CBoardReceiverSeekDlg dialog
CBoardReceiverSeekDlg::CBoardReceiverSeekDlg(CWnd* pParent /*=NULL*/) : CDialog(CBoardReceiverSeekDlg::IDD, pParent){ //{{AFX_DATA_INIT(CBoardReceiverSeekDlg)
m_nRadio = 0; //}}AFX_DATA_INIT
}
void CBoardReceiverSeekDlg::DoDataExchange(CDataExchange* pDX){ CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CBoardReceiverSeekDlg)
DDX_Control(pDX, IDC_SPIN_STEP, m_SpinStep); DDX_Control(pDX, IDC_EDIT_STEP, m_EditStep); DDX_Control(pDX, IDC_DATETIMEPICKER_TIME, m_DateTime); DDX_Radio(pDX, IDC_RADIO_STEP, m_nRadio); //}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CBoardReceiverSeekDlg, CDialog) //{{AFX_MSG_MAP(CBoardReceiverSeekDlg)
ON_BN_CLICKED(IDC_RADIO_STEP, OnRadioButton) ON_BN_CLICKED(IDC_RADIO_TIME, OnRadioButton) ON_BN_CLICKED(IDC_BUTTON_GOTO, OnButtonGoto) ON_BN_CLICKED(IDC_BUTTON_RUNTO, OnButtonRunto) //}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CBoardReceiverSeekDlg message handlers
BOOL CBoardReceiverSeekDlg::OnInitDialog() { CDialog::OnInitDialog();
m_DateTime.SendMessage( DTM_SETFORMAT, 0, (LONG)_T("MMM' 'dd', 'yyy' 'HH':'mm':'ss") ); m_SpinStep.SetRange32( 1, INT_MAX ); m_SpinStep.SendMessage( UDM_SETPOS32, 0, (LONG)m_nStep.QuadPart );
OnRadioButton();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CBoardReceiverSeekDlg::OnRadioButton() { UpdateData();
m_DateTime.EnableWindow( m_nRadio == 1 ); m_EditStep.EnableWindow( m_nRadio == 0 ); m_SpinStep.EnableWindow( m_nRadio == 0 );}
void CBoardReceiverSeekDlg::OnButtonGoto() { if( m_nRadio == 0 ) { m_nStep.QuadPart = m_SpinStep.SendMessage( UDM_GETPOS32, 0, 0 ); }
m_bRuntoOrGoto = FALSE;
CDialog::OnOK(); }
void CBoardReceiverSeekDlg::OnButtonRunto() { if( m_nRadio == 0 ) { m_nStep.QuadPart = m_SpinStep.SendMessage( UDM_GETPOS32, 0, 0 ); }
m_bRuntoOrGoto = TRUE;
CDialog::OnOK();}
|