summaryrefslogtreecommitdiff
path: root/cpp/demo/Ice/MFC/client/HelloClient.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2009-12-09 12:39:05 +0100
committerBenoit Foucher <benoit@zeroc.com>2009-12-09 12:39:05 +0100
commit25cc004a2a31034943de354e2c4939bc56f8ee08 (patch)
tree05bfa0be8cafa069a5f9c39cd9be5c2f08d2de66 /cpp/demo/Ice/MFC/client/HelloClient.cpp
parentFix for commit for commit 7194746673432cb47f3fd1227ff163cbfe09589e (diff)
downloadice-25cc004a2a31034943de354e2c4939bc56f8ee08.tar.bz2
ice-25cc004a2a31034943de354e2c4939bc56f8ee08.tar.xz
ice-25cc004a2a31034943de354e2c4939bc56f8ee08.zip
Fixed bug 4428 - Fixed MFC client to use Ice::Dispatcher
Diffstat (limited to 'cpp/demo/Ice/MFC/client/HelloClient.cpp')
-rw-r--r--cpp/demo/Ice/MFC/client/HelloClient.cpp21
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;
}
+