Old fashion design for PC-104
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.
 
 
 
 
 

82 lines
2.0 KiB

//----------------------------------------------------------------------------
// Laser Guard Ltd.
// Copyright © 2000-2002. All Rights Reserved.
// Version 1.0 01/01/2000
// Last modification: 08/10/2003
// PROJECT:
// SUBSYSTEM:
// FILE: DateTimeDlg.cpp
// AUTHOR: Sergey Chizhevskiy
// OVERVIEW
// ~~~~~~~~
// Source file of DateTimeDlg.cpp
//----------------------------------------------------------------------------
// DateTimeDlg.cpp : implementation file
//
#include "stdafx.h"
#include "chicago.h"
#include "DateTimeDlg.h"
#include "..\..\LgLib\Version.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDateTimeDlg dialog
CDateTimeDlg::CDateTimeDlg(CWnd* pParent /*=NULL*/)
: CDialog(CDateTimeDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CDateTimeDlg)
//}}AFX_DATA_INIT
LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, _T("CDateTimeDlg::CDateTimeDlg") );
}
void CDateTimeDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDateTimeDlg)
DDX_Control(pDX, IDC_DATETIMEPICKER_DATE, m_DateTime);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CDateTimeDlg, CDialog)
//{{AFX_MSG_MAP(CDateTimeDlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDateTimeDlg message handlers
BOOL CDateTimeDlg::OnInitDialog()
{
CDialog::OnInitDialog();
CTime timeFrom, timeTo;
LPCTSTR pFormat = "MMMM' 'dd', 'yyy', 'HH':'mm':'ss";
m_DateTime.SetFormat( pFormat );
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CDateTimeDlg::OnOK()
{
CTime datetime;
m_DateTime.GetTime( datetime );
SYSTEMTIME st;
datetime.GetAsSystemTime( st );
::SetLocalTime( &st );
CDialog::OnOK();
}