1 // NewBoxDlg.cpp : implementation file
10 /////////////////////////////////////////////////////////////////////////////
13 CNewBoxDlg::CNewBoxDlg(CWnd* pParent /*=NULL*/)
14 : CDialog(CNewBoxDlg::IDD, pParent)
16 //{{AFX_DATA_INIT(CNewBoxDlg)
27 void CNewBoxDlg::DoDataExchange(CDataExchange* pDX)
29 CDialog::DoDataExchange(pDX);
30 //{{AFX_DATA_MAP(CNewBoxDlg)
31 DDX_Text(pDX, IDC_H, m_h);
32 DDX_Text(pDX, IDC_L, m_l);
33 DDX_Text(pDX, IDC_NAME, m_Name);
34 DDX_Text(pDX, IDC_W, m_w);
35 DDX_Text(pDX, IDC_X, m_x);
36 DDX_Text(pDX, IDC_Y, m_y);
37 DDX_Text(pDX, IDC_Z, m_z);
42 BEGIN_MESSAGE_MAP(CNewBoxDlg, CDialog)
43 //{{AFX_MSG_MAP(CNewBoxDlg)
47 /////////////////////////////////////////////////////////////////////////////
48 // CNewBoxDlg message handlers
50 void CNewBoxDlg::OnOK()
53 if( (m_h<=Precision::Confusion()) || (m_l<=Precision::Confusion()) || (m_w<=Precision::Confusion()) )
55 MessageBox (L"Length, height and width of a box should be srictly positives.", L"New box", MB_ICONEXCLAMATION);
62 void CNewBoxDlg::InitFields(Standard_Real x, Standard_Real y, Standard_Real z, Standard_Real w, Standard_Real l, Standard_Real h, const TCollection_ExtendedString &Name)
70 TCollection_AsciiString AsciiName(Name);
71 m_Name=AsciiName.ToCString();