DlgEditFloat.cpp 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /* Copyright (c) 2002-2012 Croteam Ltd.
  2. This program is free software; you can redistribute it and/or modify
  3. it under the terms of version 2 of the GNU General Public License as published by
  4. the Free Software Foundation
  5. This program is distributed in the hope that it will be useful,
  6. but WITHOUT ANY WARRANTY; without even the implied warranty of
  7. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  8. GNU General Public License for more details.
  9. You should have received a copy of the GNU General Public License along
  10. with this program; if not, write to the Free Software Foundation, Inc.,
  11. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
  12. // DlgEditFloat.cpp : implementation file
  13. //
  14. #include "stdafx.h"
  15. #include "WorldEditor.h"
  16. #include "DlgEditFloat.h"
  17. #ifdef _DEBUG
  18. #undef new
  19. #define new DEBUG_NEW
  20. #undef THIS_FILE
  21. static char THIS_FILE[] = __FILE__;
  22. #endif
  23. /////////////////////////////////////////////////////////////////////////////
  24. // CDlgEditFloat dialog
  25. CDlgEditFloat::CDlgEditFloat(CWnd* pParent /*=NULL*/)
  26. : CDialog(CDlgEditFloat::IDD, pParent)
  27. {
  28. //{{AFX_DATA_INIT(CDlgEditFloat)
  29. m_fEditFloat = 0.0f;
  30. m_strVarName = _T("");
  31. //}}AFX_DATA_INIT
  32. m_strTitle="Type new value";
  33. }
  34. void CDlgEditFloat::DoDataExchange(CDataExchange* pDX)
  35. {
  36. // if dialog is receiving data
  37. if( pDX->m_bSaveAndValidate == FALSE)
  38. {
  39. if( IsWindow(m_hWnd))
  40. {
  41. SetWindowText(CString(m_strTitle));
  42. }
  43. }
  44. CDialog::DoDataExchange(pDX);
  45. //{{AFX_DATA_MAP(CDlgEditFloat)
  46. DDX_Text(pDX, IDC_EDIT_FLOAT, m_fEditFloat);
  47. DDX_Text(pDX, IDC_EDIT_FLOAT_T, m_strVarName);
  48. //}}AFX_DATA_MAP
  49. }
  50. BEGIN_MESSAGE_MAP(CDlgEditFloat, CDialog)
  51. //{{AFX_MSG_MAP(CDlgEditFloat)
  52. // NOTE: the ClassWizard will add message map macros here
  53. //}}AFX_MSG_MAP
  54. END_MESSAGE_MAP()
  55. /////////////////////////////////////////////////////////////////////////////
  56. // CDlgEditFloat message handlers