// iiiiiDateDlg.cpp : implementation file // #include "stdafx.h" #include "KBEditors.h" #include "General.h" #include "KBEditorsDoc.h" #include "DateDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CDateDlg dialog CDateDlg::CDateDlg(CWnd* pParent /*=NULL*/) : CDialog(CDateDlg::IDD, pParent) { //{{AFX_DATA_INIT(CDateDlg) m_Date = 0; m_Prompt = _T(""); //}}AFX_DATA_INIT } void CDateDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CDateDlg) DDX_DateTimeCtrl(pDX, IDC_DATE, m_Date); DDX_Text(pDX, IDC_Prompt, m_Prompt); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CDateDlg, CDialog) //{{AFX_MSG_MAP(CDateDlg) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CDateDlg message handlers void CDateDlg::SeeData(CProperty * inProp) { Prop = inProp; } void CDateDlg::OnOK() { UpdateData(); Val.Format("#%d/%d/%d#",m_Date.GetDay(),m_Date.GetMonth(),m_Date.GetYear()); CDialog::OnOK(); } BOOL CDateDlg::OnInitDialog() { CDialog::OnInitDialog(); CenterWindow(GetDesktopWindow()); m_Prompt= Prop->PromptA; UpdateData(FALSE); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }