2 #include "NamingViewer.h"
3 #include "NamingViewerDlg.h"
6 #include "ace/Argv_Type_Converter.h"
7 #include "ace/Init_ACE.h"
12 static char THIS_FILE
[] = __FILE__
;
15 /////////////////////////////////////////////////////////////////////////////
18 BEGIN_MESSAGE_MAP(CNamingViewerApp
, CWinApp
)
19 //{{AFX_MSG_MAP(CNamingViewerApp)
20 // NOTE - the ClassWizard will add and remove mapping macros here.
21 // DO NOT EDIT what you see in these blocks of generated code!
23 ON_COMMAND(ID_HELP
, CWinApp::OnHelp
)
26 /////////////////////////////////////////////////////////////////////////////
27 // CNamingViewerApp construction
29 CNamingViewerApp::CNamingViewerApp()
31 // TODO: add construction code here,
32 // Place all significant initialization in InitInstance
35 /////////////////////////////////////////////////////////////////////////////
36 // The one and only CNamingViewerApp object
38 CNamingViewerApp theApp
;
40 /////////////////////////////////////////////////////////////////////////////
41 // CNamingViewerApp initialization
43 BOOL
CNamingViewerApp::InitInstance()
45 // Standard initialization
46 // If you are not using these features and wish to reduce the size
47 // of your final executable, you should remove from the following
48 // the specific initialization routines you do not need.
50 From MFC 5.0, Enable3dControls and Enable3dControlsStatic are obsolete
51 because their functionality is incorporated into Microsoft's 32-bit
52 operating systems. Basically no need to call with VC5.0 and above.
54 #if !defined (_WIN32_WCE)
56 Enable3dControls(); // Call this when using MFC in a shared DLL
58 Enable3dControlsStatic(); // Call this when linking to MFC statically
62 // Parse command line arguments so we can initialize ORB with them
63 ACE_ARGV
Argv (m_lpCmdLine
);
67 int argc
= Argv
.argc ();
68 CORBA::ORB_var ORB
= CORBA::ORB_init(argc
, Argv
.argv());
70 CNamingViewerDlg
dlg(ORB
);
72 int const nResponse
= dlg
.DoModal();
73 if (nResponse
== IDOK
)
75 // TODO: Place code here to handle when the dialog is
78 else if (nResponse
== IDCANCEL
)
80 // TODO: Place code here to handle when the dialog is
81 // dismissed with Cancel
85 // Since the dialog has been closed, return FALSE so that we exit the
86 // application, rather than start the application's message pump.