|
// AddFilesDLG.cpp : implementation file
//
#include "stdafx.h"
#include "resource.h"
#include "AddFilesDLG.h"
IMPLEMENT_DYNAMIC(CAddFilesDLG, CDialog)
BEGIN_MESSAGE_MAP(CAddFilesDLG, CDialog)
END_MESSAGE_MAP()
/*
=====================================================================
=====================================================================
CAddFilesDLG
=====================================================================
=====================================================================
*/
/*
=====================================================================
=====================================================================
*/
CAddFilesDLG::CAddFilesDLG(CWnd* pParent /*=NULL*/)
: CDialog(CAddFilesDLG::IDD, pParent)
, _startTime(0)
, _endTime(-1)
{
}
/*
=====================================================================
=====================================================================
*/
CAddFilesDLG::~CAddFilesDLG()
{
}
/*
=====================================================================
=====================================================================
*/
void CAddFilesDLG::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Text(pDX, IDC_StartTime, _startTime);
DDX_Text(pDX, IDC_EndTime, _endTime);
}
/*
=====================================================================
=====================================================================
*/
void CAddFilesDLG::OnBnClicked_Browse()
{
UpdateData( FALSE );
}
/*
=====================================================================
=====================================================================
*/
void CAddFilesDLG::get( double& startTime, double& endTime )
{
startTime = _startTime;
endTime = _endTime;
}
/*
=====================================================================
=====================================================================
*/
BOOL CAddFilesDLG::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
/*
=====================================================================
=====================================================================
*/
void CAddFilesDLG::OnOK()
{
if( !_validateData() )
CDialog::OnOK();
}
/*
=====================================================================
=====================================================================
*/
void CAddFilesDLG::set( double startTime, double endTime )
{
_startTime = startTime;
_endTime = endTime;
}
/*
=====================================================================
=====================================================================
CAddFilesDLG - private functions
=====================================================================
=====================================================================
*/
/*
=====================================================================
=====================================================================
*/
int CAddFilesDLG::_validateData()
{
UpdateData();
if( 0 <= _endTime && _startTime > _endTime ) {
MessageBox( _T("The start time must be less than the end time") );
return 1;
}
return 0;
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.