// SelYear.cpp : implementation file // #include "stdafx.h" #include "dbserver.h" #include "SelYear.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // SelYear dialog SelYear::SelYear(CWnd* pParent /*=NULL*/) : CDialog(SelYear::IDD, pParent) { //{{AFX_DATA_INIT(SelYear) m_year = 0; //}}AFX_DATA_INIT } void SelYear::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(SelYear) DDX_Text(pDX, IDC_EDIT1, m_year); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(SelYear, CDialog) //{{AFX_MSG_MAP(SelYear) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // SelYear message handlers void SelYear::OnOK() { // TODO: Add extra validation here UpdateData(); if(m_year<2000 || m_year>9999) { MessageBox("ÊäÈëÓÐÎó");return; } CDialog::OnOK(); }