1 // NewCylDlg.cpp : implementation file
10 /////////////////////////////////////////////////////////////////////////////
13 CNewCylDlg::CNewCylDlg(CWnd* pParent /*=NULL*/)
14 : CDialog(CNewCylDlg::IDD, pParent)
16 //{{AFX_DATA_INIT(CNewCylDlg)
18 m_Name = _T("Cylinder");
26 void CNewCylDlg::DoDataExchange(CDataExchange* pDX)
28 CDialog::DoDataExchange(pDX);
29 //{{AFX_DATA_MAP(CNewCylDlg)
30 DDX_Text(pDX, IDC_H, m_h);
31 DDX_Text(pDX, IDC_NAME, m_Name);
32 DDX_Text(pDX, IDC_R, m_r);
33 DDX_Text(pDX, IDC_X, m_x);
34 DDX_Text(pDX, IDC_Y, m_y);
35 DDX_Text(pDX, IDC_Z, m_z);
40 BEGIN_MESSAGE_MAP(CNewCylDlg, CDialog)
41 //{{AFX_MSG_MAP(CNewCylDlg)
45 /////////////////////////////////////////////////////////////////////////////
46 // CNewCylDlg message handlers
48 void CNewCylDlg::OnOK()
51 if( (m_h<=Precision::Confusion()) || (m_r<=Precision::Confusion()) )
53 MessageBox("Radius and height of a cylinder should be srictly positives.", "New box",MB_ICONEXCLAMATION);
60 void CNewCylDlg::InitFields(Standard_Real x, Standard_Real y, Standard_Real z, Standard_Real r, Standard_Real h, const TCollection_ExtendedString &Name)
67 TCollection_AsciiString AsciiName(Name);
68 m_Name=AsciiName.ToCString();