// NumberDlg.cpp : implementation file // #include "stdafx.h" #include "KBEditors.h" #include "General.h" #include "KBEditorsDoc.h" #include "NumberDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CNumberDlg dialog CNumberDlg::CNumberDlg(CWnd* pParent /*=NULL*/) : CDialog(CNumberDlg::IDD, pParent) { //{{AFX_DATA_INIT(CNumberDlg) m_Val = _T(""); m_Prompt = _T(""); //}}AFX_DATA_INIT } void CNumberDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CNumberDlg) DDX_Text(pDX, IDC_VAL, m_Val); DDX_Text(pDX, IDC_Prompt, m_Prompt); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CNumberDlg, CDialog) //{{AFX_MSG_MAP(CNumberDlg) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CNumberDlg message handlers void CNumberDlg::SeeData(CProperty * inProp) { Prop = inProp; } void CNumberDlg::OnOK() { UpdateData(TRUE); Val = m_Val; UpdateData(FALSE); CDialog::OnOK(); } BOOL CNumberDlg::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 }