diff options
Diffstat (limited to 'cppe/demo/IceE/chat/ChatClient.cpp')
-rw-r--r-- | cppe/demo/IceE/chat/ChatClient.cpp | 168 |
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; } |