home *** CD-ROM | disk | FTP | other *** search
/ PC go! 2008 April / PCgo 2008-04 (DVD).iso / interface / contents / demoversionen_3846 / 13664 / files / Data1.cab / addproperty.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2001-10-16  |  1.9 KB  |  74 lines

  1. /******************************************************************/
  2. /*                                                                */
  3. /*                      TurboCAD for Windows                      */
  4. /*                   Copyright (c) 1993 - 2001                    */
  5. /*             International Microcomputer Software, Inc.         */
  6. /*                            (IMSI)                              */
  7. /*                      All rights reserved.                      */
  8. /*                                                                */
  9. /******************************************************************/
  10.  
  11. // AddProperty.cpp : implementation file
  12. //
  13.  
  14. #include "stdafx.h"
  15. #include "LTSample.h"
  16. #include "AddProperty.h"
  17.  
  18. #ifdef _DEBUG
  19. #define new DEBUG_NEW
  20. #undef THIS_FILE
  21. static char THIS_FILE[] = __FILE__;
  22. #endif
  23.  
  24. /////////////////////////////////////////////////////////////////////////////
  25. // CAddProperty dialog
  26.  
  27.  
  28. CAddProperty::CAddProperty(CWnd* pParent /*=NULL*/)
  29.     : CDialog(CAddProperty::IDD, pParent)
  30. {
  31.     //{{AFX_DATA_INIT(CAddProperty)
  32.     m_cstrName = _T("");
  33.     m_cstrType = _T("");
  34.     m_bReadOnly = FALSE;
  35.     //}}AFX_DATA_INIT
  36. }
  37.  
  38.  
  39. void CAddProperty::DoDataExchange(CDataExchange* pDX)
  40. {
  41.     CDialog::DoDataExchange(pDX);
  42.     //{{AFX_DATA_MAP(CAddProperty)
  43.     DDX_Text(pDX, IDC_NAME, m_cstrName);
  44.     DDX_CBString(pDX, IDC_PROPERTYPE, m_cstrType);
  45.     DDX_Check(pDX, IDC_READONLY, m_bReadOnly);
  46.     //}}AFX_DATA_MAP
  47. }
  48.  
  49.  
  50. BEGIN_MESSAGE_MAP(CAddProperty, CDialog)
  51.     //{{AFX_MSG_MAP(CAddProperty)
  52.     //}}AFX_MSG_MAP
  53. END_MESSAGE_MAP()
  54.  
  55. /////////////////////////////////////////////////////////////////////////////
  56. // CAddProperty message handlers
  57.  
  58. void CAddProperty::OnOK() 
  59. {
  60.     UpdateData();
  61.     if (m_cstrName.IsEmpty())
  62.     {
  63.         AfxMessageBox(IDS_PROPERTYNAMEISNEED);
  64.         return;
  65.     }
  66.     if (m_cstrType.IsEmpty())
  67.     {
  68.         AfxMessageBox(IDS_PROPERTYTYPEISNEED);
  69.         return;
  70.     }
  71.     
  72.     CDialog::OnOK();
  73. }
  74.