Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / utils / NamingViewer / AddNameServerDlg.cpp
blob132f14a3600a5e21b5e904ac4f84fe1b43fb8fb0
1 #include "stdafx.h"
2 #include "NamingViewer.h"
3 #include "AddNameServerDlg.h"
5 #ifdef _DEBUG
6 #define new DEBUG_NEW
7 #undef THIS_FILE
8 static char THIS_FILE[] = __FILE__;
9 #endif
11 /////////////////////////////////////////////////////////////////////////////
12 // CAddNameServerDlg dialog
15 CAddNameServerDlg::CAddNameServerDlg(CWnd* pParent /*=NULL*/)
16 : CDialog(CAddNameServerDlg::IDD, pParent)
18 //{{AFX_DATA_INIT(CAddNameServerDlg)
19 m_IOR = _T("corbaloc:iiop:1.1@myserver:nsport/NameService");
20 m_Name = _T("");
21 //}}AFX_DATA_INIT
25 void CAddNameServerDlg::DoDataExchange(CDataExchange* pDX)
27 CDialog::DoDataExchange(pDX);
28 //{{AFX_DATA_MAP(CAddNameServerDlg)
29 DDX_Text(pDX, IDC_IOR, m_IOR);
30 DDX_Text(pDX, IDC_NAME, m_Name);
31 //}}AFX_DATA_MAP
35 BEGIN_MESSAGE_MAP(CAddNameServerDlg, CDialog)
36 //{{AFX_MSG_MAP(CAddNameServerDlg)
37 //}}AFX_MSG_MAP
38 END_MESSAGE_MAP()
40 /////////////////////////////////////////////////////////////////////////////
41 // CAddNameServerDlg message handlers
43 void CAddNameServerDlg::OnOK()
45 UpdateData();
46 if (m_Name.Trim() == _T("")) // Is a particular field still empty?
48 AfxMessageBox(_T("Please enter a server name"));
49 return;
51 CDialog::OnOK();