InputPrice.cpp 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // InputPrice.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "ylgl.h"
  5. #include "InputPrice.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. /////////////////////////////////////////////////////////////////////////////
  12. // InputPrice dialog
  13. InputPrice::InputPrice(CWnd* pParent /*=NULL*/)
  14. : CDialog(InputPrice::IDD, pParent)
  15. {
  16. //{{AFX_DATA_INIT(InputPrice)
  17. m_price = _T("");
  18. //}}AFX_DATA_INIT
  19. }
  20. void InputPrice::DoDataExchange(CDataExchange* pDX)
  21. {
  22. CDialog::DoDataExchange(pDX);
  23. //{{AFX_DATA_MAP(InputPrice)
  24. DDX_Control(pDX, IDC_EDIT1, m_editnum);
  25. DDX_Text(pDX, IDC_EDIT1, m_price);
  26. //}}AFX_DATA_MAP
  27. }
  28. BEGIN_MESSAGE_MAP(InputPrice, CDialog)
  29. //{{AFX_MSG_MAP(InputPrice)
  30. //}}AFX_MSG_MAP
  31. END_MESSAGE_MAP()
  32. /////////////////////////////////////////////////////////////////////////////
  33. // InputPrice message handlers
  34. void InputPrice::OnOK()
  35. {
  36. // TODO: Add extra validation here
  37. UpdateData();
  38. m_price.TrimLeft ();m_price.TrimRight ();
  39. if(m_price=="")return;
  40. CDialog::OnOK();
  41. }