1 // NewBoxDlg.cpp : implementation file
7 static char THIS_FILE[] = __FILE__;
12 #include "NewBoxDlg.h"
14 //#include "OcafApp.h"
16 /////////////////////////////////////////////////////////////////////////////
19 CNewBoxDlg::CNewBoxDlg(CWnd* pParent /*=NULL*/)
20 : CDialog(CNewBoxDlg::IDD, pParent)
22 //{{AFX_DATA_INIT(CNewBoxDlg)
33 void CNewBoxDlg::DoDataExchange(CDataExchange* pDX)
35 CDialog::DoDataExchange(pDX);
36 //{{AFX_DATA_MAP(CNewBoxDlg)
37 DDX_Text(pDX, IDC_H, m_h);
38 DDX_Text(pDX, IDC_L, m_l);
39 DDX_Text(pDX, IDC_NAME, m_Name);
40 DDX_Text(pDX, IDC_W, m_w);
41 DDX_Text(pDX, IDC_X, m_x);
42 DDX_Text(pDX, IDC_Y, m_y);
43 DDX_Text(pDX, IDC_Z, m_z);
48 BEGIN_MESSAGE_MAP(CNewBoxDlg, CDialog)
49 //{{AFX_MSG_MAP(CNewBoxDlg)
53 /////////////////////////////////////////////////////////////////////////////
54 // CNewBoxDlg message handlers
56 void CNewBoxDlg::OnOK()
59 if( (m_h<=Precision::Confusion()) || (m_l<=Precision::Confusion()) || (m_w<=Precision::Confusion()) )
61 MessageBox("Length, height and width of a box should be srictly positives.", "New box",MB_ICONEXCLAMATION);
68 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)
76 TCollection_AsciiString AsciiName(Name);
77 m_Name=AsciiName.ToCString();