12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- // InputDate.cpp : implementation file
- //
- #include "stdafx.h"
- #include "ylgl.h"
- #include "InputDate.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // InputDate dialog
- InputDate::InputDate(CWnd* pParent /*=NULL*/)
- : CDialog(InputDate::IDD, pParent)
- {
- //{{AFX_DATA_INIT(InputDate)
- m_name = _T("");
- m_date = _T("");
- m_mode=0;
- //}}AFX_DATA_INIT
- }
- void InputDate::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(InputDate)
- DDX_Control(pDX, IDC_EDIT2, m_ctrldate);
- DDX_Text(pDX, IDC_EDIT1, m_name);
- DDX_Text(pDX, IDC_EDIT2, m_date);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(InputDate, CDialog)
- //{{AFX_MSG_MAP(InputDate)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // InputDate message handlers
- void InputDate::OnOK()
- {
- // TODO: Add extra validation here
- UpdateData();
- if(!CheckDateOK(m_date))return;
- if(m_date.IsEmpty ())return;
- CDialog::OnOK();
- }
- BOOL InputDate::OnInitDialog()
- {
- CDialog::OnInitDialog();
-
- // TODO: Add extra initialization here
- if(m_mode)
- {
- SetWindowText("°²ÅÅÈÕÆÚ");
- GetDlgItem(IDC_EDIT1)->ShowWindow(0);
- GetDlgItem(IDC_STATIC1)->ShowWindow(0);
- }
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }
|