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

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //----------------------------------------------------------------------------
  2. // Laser Guard Ltd.
  3. // Copyright � 2000-2002. All Rights Reserved.
  4. // Version 1.0 01/01/2000
  5. // Last modification: 08/10/2003
  6. // PROJECT:
  7. // SUBSYSTEM:
  8. // FILE: DateTimeDlg.cpp
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Source file of DateTimeDlg.cpp
  13. //----------------------------------------------------------------------------
  14. // DateTimeDlg.cpp : implementation file
  15. //
  16. #include "stdafx.h"
  17. #include "chicago.h"
  18. #include "DateTimeDlg.h"
  19. #include "..\..\LgLib\Version.h"
  20. #ifdef _DEBUG
  21. #define new DEBUG_NEW
  22. #undef THIS_FILE
  23. static char THIS_FILE[] = __FILE__;
  24. #endif
  25. /////////////////////////////////////////////////////////////////////////////
  26. // CDateTimeDlg dialog
  27. CDateTimeDlg::CDateTimeDlg(CWnd* pParent /*=NULL*/)
  28. : CDialog(CDateTimeDlg::IDD, pParent)
  29. {
  30. //{{AFX_DATA_INIT(CDateTimeDlg)
  31. //}}AFX_DATA_INIT
  32. LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, _T("CDateTimeDlg::CDateTimeDlg") );
  33. }
  34. void CDateTimeDlg::DoDataExchange(CDataExchange* pDX)
  35. {
  36. CDialog::DoDataExchange(pDX);
  37. //{{AFX_DATA_MAP(CDateTimeDlg)
  38. DDX_Control(pDX, IDC_DATETIMEPICKER_DATE, m_DateTime);
  39. //}}AFX_DATA_MAP
  40. }
  41. BEGIN_MESSAGE_MAP(CDateTimeDlg, CDialog)
  42. //{{AFX_MSG_MAP(CDateTimeDlg)
  43. //}}AFX_MSG_MAP
  44. END_MESSAGE_MAP()
  45. /////////////////////////////////////////////////////////////////////////////
  46. // CDateTimeDlg message handlers
  47. BOOL CDateTimeDlg::OnInitDialog()
  48. {
  49. CDialog::OnInitDialog();
  50. CTime timeFrom, timeTo;
  51. LPCTSTR pFormat = "MMMM' 'dd', 'yyy', 'HH':'mm':'ss";
  52. m_DateTime.SetFormat( pFormat );
  53. return TRUE; // return TRUE unless you set the focus to a control
  54. // EXCEPTION: OCX Property Pages should return FALSE
  55. }
  56. void CDateTimeDlg::OnOK()
  57. {
  58. CTime datetime;
  59. m_DateTime.GetTime( datetime );
  60. SYSTEMTIME st;
  61. datetime.GetAsSystemTime( st );
  62. ::SetLocalTime( &st );
  63. CDialog::OnOK();
  64. }