// InputPrice.cpp : implementation file // #include "stdafx.h" #include "ylgl.h" #include "InputPrice.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // InputPrice dialog InputPrice::InputPrice(CWnd* pParent /*=NULL*/) : CDialog(InputPrice::IDD, pParent) { //{{AFX_DATA_INIT(InputPrice) m_price = _T(""); //}}AFX_DATA_INIT } void InputPrice::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(InputPrice) DDX_Control(pDX, IDC_EDIT1, m_editnum); DDX_Text(pDX, IDC_EDIT1, m_price); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(InputPrice, CDialog) //{{AFX_MSG_MAP(InputPrice) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // InputPrice message handlers void InputPrice::OnOK() { // TODO: Add extra validation here UpdateData(); m_price.TrimLeft ();m_price.TrimRight (); if(m_price=="")return; CDialog::OnOK(); }