diff options
Diffstat (limited to 'cpp/demo/Ice/MFC/client/HelloClient.cpp')
-rw-r--r-- | cpp/demo/Ice/MFC/client/HelloClient.cpp | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/cpp/demo/Ice/MFC/client/HelloClient.cpp b/cpp/demo/Ice/MFC/client/HelloClient.cpp index 7c48b6a0e2d..4e5141fcd19 100644 --- a/cpp/demo/Ice/MFC/client/HelloClient.cpp +++ b/cpp/demo/Ice/MFC/client/HelloClient.cpp @@ -15,13 +15,14 @@ #define new DEBUG_NEW #endif +#define WM_AMI_CALLBACK (WM_USER + 1) + BEGIN_MESSAGE_MAP(CHelloClientApp, CWinApp) ON_COMMAND(ID_HELP, CWinApp::OnHelp) END_MESSAGE_MAP() using namespace std; - CHelloClientApp::CHelloClientApp() { // Place all significant initialization in InitInstance @@ -41,17 +42,11 @@ CHelloClientApp::InitInstance() CWinApp::InitInstance(); - // - // Create a communicator. - // - Ice::CommunicatorPtr communicator; try { - int argc = 0; - Ice::InitializationData initData; - initData.properties = Ice::createProperties(); - initData.properties->load("config"); - communicator = Ice::initialize(argc, 0, initData); + CHelloClientDlg dlg; + m_pMainWnd = &dlg; + dlg.DoModal(); } catch(const IceUtil::Exception& ex) { @@ -59,14 +54,10 @@ CHelloClientApp::InitInstance() ostr << ex; string s = ostr.str(); AfxMessageBox(CString(s.c_str()), MB_OK|MB_ICONEXCLAMATION); - return FALSE; } - CHelloClientDlg dlg(communicator); - m_pMainWnd = &dlg; - dlg.DoModal(); - // Since the dialog has been closed, return FALSE so that we exit the // application, rather than start the application's message pump. return FALSE; } + |