summaryrefslogtreecommitdiff
path: root/cppe/demo/IceE/chat/ChatClient.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2006-02-27 16:51:04 +0000
committerDwayne Boone <dwayne@zeroc.com>2006-02-27 16:51:04 +0000
commitf6a343899616a6efb1f0e6d0bfc81fef7d7eb37e (patch)
treea8b8fa3ba47238a1c6a3c81a79b60ae5323f73c6 /cppe/demo/IceE/chat/ChatClient.cpp
parentFix (diff)
downloadice-f6a343899616a6efb1f0e6d0bfc81fef7d7eb37e.tar.bz2
ice-f6a343899616a6efb1f0e6d0bfc81fef7d7eb37e.tar.xz
ice-f6a343899616a6efb1f0e6d0bfc81fef7d7eb37e.zip
Fixed chat mfc client to work with VC8
Diffstat (limited to 'cppe/demo/IceE/chat/ChatClient.cpp')
-rw-r--r--cppe/demo/IceE/chat/ChatClient.cpp168
1 files changed, 84 insertions, 84 deletions
diff --git a/cppe/demo/IceE/chat/ChatClient.cpp b/cppe/demo/IceE/chat/ChatClient.cpp
index 747fda1452a..229b8b20f42 100644
--- a/cppe/demo/IceE/chat/ChatClient.cpp
+++ b/cppe/demo/IceE/chat/ChatClient.cpp
@@ -7,94 +7,94 @@
//
// **********************************************************************
-
-#include <stdafx.h>
-#include <ChatClient.h>
-#include <ChatClientDlg.h>
-#include <Chat.h>
+
+#include <stdafx.h>
+#include <ChatClient.h>
+#include <ChatClientDlg.h>
+#include <Chat.h>
#include <LogI.h>
-
-#ifdef _DEBUG
-#define new DEBUG_NEW
-#endif
-
-
-
-BEGIN_MESSAGE_MAP(CChatClientApp, CWinApp)
-END_MESSAGE_MAP()
-
-CChatClientApp::CChatClientApp()
-{
- // Place all significant initialization in InitInstance
-}
-
-// The one and only CChatClientApp object
-
-CChatClientApp theApp;
-
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#endif
+
+
+
+BEGIN_MESSAGE_MAP(CChatClientApp, CWinApp)
+END_MESSAGE_MAP()
+
+CChatClientApp::CChatClientApp()
+{
+ // Place all significant initialization in InitInstance
+}
+
+// The one and only CChatClientApp object
+
+CChatClientApp theApp;
+
#ifdef ICEE_HAS_ROUTER
-BOOL CChatClientApp::InitInstance()
-{
- //
- // InitCommonControls() is required on Windows XP if an application
- // manifest specifies use of ComCtl32.dll version 6 or later to enable
- // visual styles. Otherwise, any window creation will fail.
- //
- InitCommonControls();
-
- CWinApp::InitInstance();
-
- //
- // Create a communicator.
- //
- Ice::CommunicatorPtr communicator;
- LogIPtr log;
- try
- {
- int argc = 0;
- communicator = Ice::initialize(argc, 0);
- log = new LogI;
- communicator->setLogger(log);
- }
- catch(const Ice::Exception& ex)
- {
- AfxMessageBox(CString(ex.toString().c_str()), MB_OK|MB_ICONEXCLAMATION);
- return FALSE;
- }
-
- //
- // Create the main dialog.
- //
- CChatClientDlg dlg(communicator, log);
-
- //
+BOOL CChatClientApp::InitInstance()
+{
+ //
+ // InitCommonControls() is required on Windows XP if an application
+ // manifest specifies use of ComCtl32.dll version 6 or later to enable
+ // visual styles. Otherwise, any window creation will fail.
+ //
+ InitCommonControls();
+
+ CWinApp::InitInstance();
+
+ //
+ // Create a communicator.
+ //
+ Ice::CommunicatorPtr communicator;
+ LogIPtr log;
+ try
+ {
+ int argc = 0;
+ communicator = Ice::initialize(argc, 0);
+ log = new LogI;
+ communicator->setLogger(log);
+ }
+ catch(const Ice::Exception& ex)
+ {
+ AfxMessageBox(CString(ex.toString().c_str()), MB_OK|MB_ICONEXCLAMATION);
+ return FALSE;
+ }
+
+ //
+ // Create the main dialog.
+ //
+ CChatClientDlg dlg(communicator, log);
+
+ //
// Show dialog and wait until it is closed.
- //
- m_pMainWnd = &dlg;
- dlg.DoModal();
-
- //
- // Edit control no longer exists.
- //
- log->setHandle(0);
-
- //
- // Clean up.
- //
- try
- {
- communicator->destroy();
- }
- catch(const Ice::Exception&)
- {
- }
-
- // Since the dialog has been closed, return FALSE so that we exit the
- // application, rather than start the application's message pump.
- return FALSE;
-}
+ //
+ m_pMainWnd = &dlg;
+ dlg.DoModal();
+
+ //
+ // Edit control no longer exists.
+ //
+ log->setHandle(0);
+
+ //
+ // Clean up.
+ //
+ try
+ {
+ communicator->destroy();
+ }
+ catch(const Ice::Exception&)
+ {
+ }
+
+ // Since the dialog has been closed, return FALSE so that we exit the
+ // application, rather than start the application's message pump.
+ return FALSE;
+}
#else
@@ -102,7 +102,7 @@ BOOL CChatClientApp::InitInstance()
{
InitCommonControls();
CWinApp::InitInstance();
- AfxMessageBox(CString("This demo requires Ice-E built with router support."), MB_OK|MB_ICONEXCLAMATION);
+ AfxMessageBox(CString("This demo requires Ice-E built with router support."), MB_OK|MB_ICONEXCLAMATION);
return FALSE;
}