diff options
Diffstat (limited to 'cppe')
-rw-r--r-- | cppe/all.dsw | 15 | ||||
-rw-r--r-- | cppe/demo/IceE/chat/ChatClient.cpp | 158 | ||||
-rw-r--r-- | cppe/demo/IceE/chat/ChatClient.h | 34 | ||||
-rwxr-xr-x | cppe/demo/IceE/chat/ChatClient.rc | 173 | ||||
-rw-r--r-- | cppe/demo/IceE/chat/ChatClientDlg.cpp | 139 | ||||
-rw-r--r-- | cppe/demo/IceE/chat/ChatClientDlg.h | 46 | ||||
-rw-r--r-- | cppe/demo/IceE/chat/LogI.cpp | 86 | ||||
-rw-r--r-- | cppe/demo/IceE/chat/LogI.h | 35 | ||||
-rwxr-xr-x | cppe/demo/IceE/chat/mfcchatC.dsp | 439 | ||||
-rw-r--r-- | cppe/demo/IceE/chat/res/ChatClient.ico | bin | 0 -> 21630 bytes | |||
-rw-r--r-- | cppe/demo/IceE/chat/res/ChatClient.rc2 | 13 | ||||
-rwxr-xr-x | cppe/demo/IceE/chat/resource.h | 22 | ||||
-rw-r--r-- | cppe/demo/IceE/chat/stdafx.cpp | 17 | ||||
-rw-r--r-- | cppe/demo/IceE/chat/stdafx.h | 65 |
14 files changed, 1242 insertions, 0 deletions
diff --git a/cppe/all.dsw b/cppe/all.dsw index 83cfe374660..23589d9e213 100644 --- a/cppe/all.dsw +++ b/cppe/all.dsw @@ -588,6 +588,21 @@ Package=<4> ###############################################################################
+Project: "mfcchatC"=.\demo\IceE\chat\mfcchatC.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name ice
+ End Project Dependency
+}}}
+
+###############################################################################
+
Project: "mfchelloC"=.\demo\IceE\MFC\client\mfchelloC.dsp - Package Owner=<4>
Package=<5>
diff --git a/cppe/demo/IceE/chat/ChatClient.cpp b/cppe/demo/IceE/chat/ChatClient.cpp new file mode 100644 index 00000000000..553ce8dcdbb --- /dev/null +++ b/cppe/demo/IceE/chat/ChatClient.cpp @@ -0,0 +1,158 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2005 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +
+#include "stdafx.h"
+#include "ChatClient.h"
+#include "ChatClientDlg.h"
+#include "Router.h"
+#include "Chat.h"
+#include "LogI.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#endif
+
+BEGIN_MESSAGE_MAP(CChatClientApp, CWinApp)
+ ON_COMMAND(ID_HELP, CWinApp::OnHelp)
+END_MESSAGE_MAP()
+ +class ChatCallbackI : public Demo::ChatCallback +{ +public: + + ChatCallbackI(LogIPtr log) + : _log(log) + { + } + + virtual void + message(const std::string& data, const Ice::Current&) + { + _log->message(data); + } + +private: + + LogIPtr _log; +}; + +
+CChatClientApp::CChatClientApp()
+{
+ // Place all significant initialization in InitInstance
+}
+
+// The one and only CChatClientApp object
+
+CChatClientApp theApp;
+
+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 and object adapter.
+ //
+ Ice::CommunicatorPtr communicator;
+ Ice::ObjectAdapterPtr adapter;
+ LogIPtr log;
+ Demo::ChatSessionPrx session; + try
+ {
+ int argc = 0;
+ Ice::PropertiesPtr properties = Ice::createProperties();
+ //properties->setProperty("Hello.Endpoints", "tcp -p 10000"); + properties->load("config");
+ + communicator = Ice::initializeWithProperties(argc, 0, properties);
+ log = new LogI;
+ communicator->setLogger(log);
+ + Ice::RouterPrx defaultRouter = communicator->getDefaultRouter(); + if(!defaultRouter) + { + AfxMessageBox(CString("No default router set"), MB_OK|MB_ICONEXCLAMATION); + return FALSE; + } + + Glacier2::RouterPrx router = Glacier2::RouterPrx::checkedCast(defaultRouter); + if(!router) + { + AfxMessageBox(CString("Configured router is not a Glacier2 router"), MB_OK|MB_ICONEXCLAMATION); + return FALSE; + } + + try + { + session = Demo::ChatSessionPrx::uncheckedCast(router->createSession("username", "password")); + } + catch(const Glacier2::PermissionDeniedException& ex) + { + AfxMessageBox(CString(ex.toString().c_str()), MB_OK|MB_ICONEXCLAMATION);
+ return FALSE;
+ } + + std::string category = router->getServerProxy()->ice_getIdentity().category; + Ice::Identity callbackReceiverIdent; + callbackReceiverIdent.name = "callbackReceiver"; + callbackReceiverIdent.category = category; + + Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("Chat.Client"); + Demo::ChatCallbackPrx callback = Demo::ChatCallbackPrx::uncheckedCast( + adapter->add(new ChatCallbackI(log), callbackReceiverIdent)); + adapter->activate(); + + session->setCallback(callback); + }
+ catch(const Ice::Exception& ex)
+ {
+ AfxMessageBox(CString(ex.toString().c_str()), MB_OK|MB_ICONEXCLAMATION);
+ return FALSE;
+ }
+
+ //
+ // Create the dialog.
+ //
+ CChatClientDlg dlg(communicator, session, log);
+
+ //
+ // Show dialog and wait until it is closed, or until the servant receives
+ // a shutdown request.
+ //
+ m_pMainWnd = &dlg;
+ dlg.DoModal();
+
+ //
+ // Edit control no longer exists.
+ //
+ log->setControl(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;
+}
diff --git a/cppe/demo/IceE/chat/ChatClient.h b/cppe/demo/IceE/chat/ChatClient.h new file mode 100644 index 00000000000..a4a5f4bfcd0 --- /dev/null +++ b/cppe/demo/IceE/chat/ChatClient.h @@ -0,0 +1,34 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2005 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +
+#ifndef HELLO_SERVER_H
+#define HELLO_SERVER_H
+
+#pragma once
+
+#ifndef __AFXWIN_H__
+ #error include 'stdafx.h' before including this file for PCH
+#endif
+
+#include "Resource.h"
+
+class CChatClientApp : public CWinApp
+{
+public:
+ CChatClientApp();
+
+ virtual BOOL InitInstance();
+
+ DECLARE_MESSAGE_MAP()
+};
+
+extern CChatClientApp theApp;
+
+#endif
diff --git a/cppe/demo/IceE/chat/ChatClient.rc b/cppe/demo/IceE/chat/ChatClient.rc new file mode 100755 index 00000000000..6ba226a9cda --- /dev/null +++ b/cppe/demo/IceE/chat/ChatClient.rc @@ -0,0 +1,173 @@ +//Microsoft Developer Studio generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE MOVEABLE PURE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE MOVEABLE PURE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE MOVEABLE PURE
+BEGIN
+ "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
+ "#define _AFX_NO_OLE_RESOURCES\r\n"
+ "#define _AFX_NO_TRACKER_RESOURCES\r\n"
+ "#define _AFX_NO_PROPERTY_RESOURCES\r\n"
+ "\r\n"
+ "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
+ "LANGUAGE 9, 1\r\n"
+ "#pragma code_page(1252)\r\n"
+ "#include ""res\\ChatClient.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
+ "#include ""afxres.rc"" // Standard components\r\n"
+ "#endif\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDR_MAINFRAME ICON DISCARDABLE "res\\ChatClient.ico"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_CHATCLIENT_DIALOG DIALOGEX 0, 0, 302, 214
+STYLE DS_FIXEDSYS | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION |
+ WS_SYSMENU
+EXSTYLE WS_EX_APPWINDOW
+CAPTION "IceE Chat Client"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ EDITTEXT IDC_LOG,7,174,288,13
+ DEFPUSHBUTTON "Shutdown",IDC_SHUTDOWN,245,188,50,18
+ EDITTEXT IDC_LOG2,7,7,288,161,ES_MULTILINE | ES_AUTOHSCROLL |
+ ES_READONLY | WS_VSCROLL | WS_HSCROLL
+ DEFPUSHBUTTON "Send",IDC_SEND,7,189,50,18
+END
+
+
+#ifndef _MAC
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,1
+ PRODUCTVERSION 1,0,0,1
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904e4"
+ BEGIN
+ VALUE "CompanyName", "ZeroC, Inc.\0"
+ VALUE "FileDescription", "Ice Chat Client\0"
+ VALUE "FileVersion", "1.0.0.1\0"
+ VALUE "InternalName", "ChatClient.exe\0"
+ VALUE "LegalCopyright", "Copyright (c) 2003 - 2005 ZeroC, Inc. All rights reserved.\0"
+ VALUE "OriginalFilename", "ChatClient.exe\0"
+ VALUE "ProductName", "Ice\0"
+ VALUE "ProductVersion", "1.0.0.1\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1252
+ END
+END
+
+#endif // !_MAC
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO MOVEABLE PURE
+BEGIN
+ IDD_CHATCLIENT_DIALOG, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 295
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 208
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+#define _AFX_NO_SPLITTER_RESOURCES
+#define _AFX_NO_OLE_RESOURCES
+#define _AFX_NO_TRACKER_RESOURCES
+#define _AFX_NO_PROPERTY_RESOURCES
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+LANGUAGE 9, 1
+#pragma code_page(1252)
+#include "res\ChatClient.rc2" // non-Microsoft Visual C++ edited resources
+#include "afxres.rc" // Standard components
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/cppe/demo/IceE/chat/ChatClientDlg.cpp b/cppe/demo/IceE/chat/ChatClientDlg.cpp new file mode 100644 index 00000000000..73911b74424 --- /dev/null +++ b/cppe/demo/IceE/chat/ChatClientDlg.cpp @@ -0,0 +1,139 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2005 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +
+#include "stdafx.h"
+#include "ChatClient.h"
+#include "ChatClientDlg.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#endif
+
+CChatClientDlg::CChatClientDlg(const Ice::CommunicatorPtr& communicator, const Demo::ChatSessionPrx& chat,
+ const LogIPtr& log, CWnd* pParent /*=NULL*/) :
+ CDialog(CChatClientDlg::IDD, pParent), _communicator(communicator), _chat(chat), _log(log)
+{
+ _hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
+}
+
+void
+CChatClientDlg::DoDataExchange(CDataExchange* pDX)
+{
+ CDialog::DoDataExchange(pDX);
+}
+
+BEGIN_MESSAGE_MAP(CChatClientDlg, CDialog)
+ ON_WM_PAINT()
+ ON_WM_QUERYDRAGICON()
+ //}}AFX_MSG_MAP
+ ON_BN_CLICKED(IDC_SHUTDOWN, OnShutdown)
+ ON_BN_CLICKED(IDC_SEND, OnSend)
+END_MESSAGE_MAP()
+
+BOOL
+CChatClientDlg::OnInitDialog()
+{
+ CDialog::OnInitDialog();
+
+ // Set the icon for this dialog. The framework does this automatically
+ // when the application's main window is not a dialog
+ SetIcon(_hIcon, TRUE); // Set big icon
+ SetIcon(_hIcon, FALSE); // Set small icon
+
+ //
+ // Retrieve the text input edit control.
+ //
+ _edit = (CEdit*)GetDlgItem(IDC_LOG);
+
+ // + // Retrieve the chat display edit control. + // + CEdit* disp = (CEdit*)GetDlgItem(IDC_LOG2);
+ _log->setControl(disp); + + //
+ // Set the focus to the text input + //
+ ((CButton*)GetDlgItem(IDC_LOG))->SetFocus();
+
+ return FALSE; // return FALSE because we explicitly set the focus
+}
+
+void
+CChatClientDlg::OnCancel()
+{
+ _log->setControl(0); + CDialog::OnCancel();
+}
+
+// If you add a minimize button to your dialog, you will need the code below
+// to draw the icon. For MFC applications using the document/view model,
+// this is automatically done for you by the framework.
+
+void
+CChatClientDlg::OnPaint()
+{
+#ifdef _WIN32_WCE
+ CDialog::OnPaint();
+#else
+ if (IsIconic())
+ {
+ CPaintDC dc(this); // device context for painting
+
+ SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0);
+
+ // Center icon in client rectangle
+ int cxIcon = GetSystemMetrics(SM_CXICON);
+ int cyIcon = GetSystemMetrics(SM_CYICON);
+ CRect rect;
+ GetClientRect(&rect);
+ int x = (rect.Width() - cxIcon + 1) / 2;
+ int y = (rect.Height() - cyIcon + 1) / 2;
+
+ // Draw the icon
+ dc.DrawIcon(x, y, _hIcon);
+ }
+ else
+ {
+ CDialog::OnPaint();
+ }
+#endif
+}
+
+// The system calls this function to obtain the cursor to display while the user drags
+// the minimized window.
+HCURSOR
+CChatClientDlg::OnQueryDragIcon()
+{
+ return static_cast<HCURSOR>(_hIcon);
+}
+
+void
+CChatClientDlg::OnSend()
+{
+ CString strText; + + int len = _edit->LineLength(); + _edit->GetLine(0, strText.GetBuffer(len), len); + _chat->say(std::string(strText)); + strText.ReleaseBuffer(len); + + // + // Clear text input and reset focus. + // + _edit->SetWindowText(CString("")); + ((CButton*)GetDlgItem(IDC_LOG))->SetFocus();
+}
+ +void
+CChatClientDlg::OnShutdown()
+{
+ EndDialog(0);
+}
diff --git a/cppe/demo/IceE/chat/ChatClientDlg.h b/cppe/demo/IceE/chat/ChatClientDlg.h new file mode 100644 index 00000000000..4efd24e92b6 --- /dev/null +++ b/cppe/demo/IceE/chat/ChatClientDlg.h @@ -0,0 +1,46 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2005 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +
+#ifndef HELLO_SERVER_DLG_H
+#define HELLO_SERVER_DLG_H
+
+#pragma once
+
+#include "LogI.h"
+#include "Chat.h"
+
+class CChatClientDlg : public CDialog
+{
+public:
+ CChatClientDlg(const Ice::CommunicatorPtr&, const Demo::ChatSessionPrx&, const LogIPtr&, CWnd* = NULL);
+
+ enum { IDD = IDD_HELLOSERVER_DIALOG };
+
+protected:
+ virtual void DoDataExchange(CDataExchange*); // DDX/DDV support
+
+protected:
+ Ice::CommunicatorPtr _communicator;
+ Demo::ChatSessionPrx _chat;
+ LogIPtr _log;
+ CEdit* _edit;
+ HICON _hIcon;
+
+ // Generated message map functions
+ virtual BOOL OnInitDialog();
+ virtual void OnCancel();
+ afx_msg void OnPaint();
+ afx_msg HCURSOR OnQueryDragIcon();
+ afx_msg void OnShutdown();
+ afx_msg void OnSend();
+ DECLARE_MESSAGE_MAP()
+};
+
+#endif
diff --git a/cppe/demo/IceE/chat/LogI.cpp b/cppe/demo/IceE/chat/LogI.cpp new file mode 100644 index 00000000000..705430ac49c --- /dev/null +++ b/cppe/demo/IceE/chat/LogI.cpp @@ -0,0 +1,86 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2005 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#include "stdafx.h" +#include "LogI.h" + +using namespace std; + +LogI::LogI() : + _log(0) +{ +} + +void +LogI::print(const string& msg) +{ + string s = msg; + + string::size_type idx = 0; + while((idx = s.find("\n", idx)) != string::npos) + { + s.replace(idx, 1, "\r\n "); + idx += 3; + } + + message(s); +} + +void +LogI::trace(const string& category, const string& msg) +{ + string s = "[ " + category + ": " + msg + " ]"; + + string::size_type idx = 0; + while((idx = s.find("\n", idx)) != string::npos) + { + s.replace(idx, 1, "\r\n "); + idx += 3; + } + + message(s); +} + +void +LogI::warning(const string& msg) +{ + message("warning: " + msg); +} + +void +LogI::error(const string& msg) +{ + message("error: " + msg); +} + +void +LogI::message(const string& msg) +{ + string line = msg + "\r\n"; + if(_log) + { + _log->SetSel(-1, -1); + _log->ReplaceSel(CString(line.c_str())); + } + else + { + _buffer.append(line); + } +} + +void +LogI::setControl(CEdit* log) +{ + _log = log; + if(!_buffer.empty()) + { + _log->ReplaceSel(CString(_buffer.c_str())); + _buffer.clear(); + } +} diff --git a/cppe/demo/IceE/chat/LogI.h b/cppe/demo/IceE/chat/LogI.h new file mode 100644 index 00000000000..5ac80a9f637 --- /dev/null +++ b/cppe/demo/IceE/chat/LogI.h @@ -0,0 +1,35 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2005 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#ifndef LOG_I_H +#define LOG_I_H + +class LogI : public Ice::Logger +{ +public: + + LogI(); + + virtual void print(const std::string&); + virtual void trace(const std::string&, const std::string&); + virtual void warning(const std::string&); + virtual void error(const std::string&); + + void message(const std::string&); + void setControl(CEdit*); + +private: + + std::string _buffer; + CEdit* _log; +}; + +typedef IceUtil::Handle<LogI> LogIPtr; + +#endif diff --git a/cppe/demo/IceE/chat/mfcchatC.dsp b/cppe/demo/IceE/chat/mfcchatC.dsp new file mode 100755 index 00000000000..904f341849c --- /dev/null +++ b/cppe/demo/IceE/chat/mfcchatC.dsp @@ -0,0 +1,439 @@ +# Microsoft Developer Studio Project File - Name="mfcchatC" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Application" 0x0101
+
+CFG=mfcchatC - Win32 Debug Static
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "mfcchatC.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "mfcchatC.mak" CFG="mfcchatC - Win32 Debug Static"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "mfcchatC - Win32 Release" (based on "Win32 (x86) Application")
+!MESSAGE "mfcchatC - Win32 Debug" (based on "Win32 (x86) Application")
+!MESSAGE "mfcchatC - Win32 Debug Static" (based on "Win32 (x86) Application")
+!MESSAGE "mfcchatC - Win32 Release Static" (based on "Win32 (x86) Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "mfcchatC - Win32 Release"
+
+# PROP BASE Use_MFC 6
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 6
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c
+# ADD CPP /nologo /MD /W3 /GR /GX /O1 /I "." /I "../../../include" /D "NDEBUG" /D "WIN32_LEAN_AND_MEAN" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /YX"stdafx.h" /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
+# ADD RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386
+# ADD LINK32 /nologo /subsystem:windows /incremental:yes /machine:I386 /out:"mfcclient.exe" /libpath:"../../../../lib"
+
+!ELSEIF "$(CFG)" == "mfcchatC - Win32 Debug"
+
+# PROP BASE Use_MFC 6
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 6
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "." /I "../../../include" /D "_DEBUG" /D "WIN32_LEAN_AND_MEAN" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /YX"stdafx.h" /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
+# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"mfcclient.exe" /pdbtype:sept /libpath:"../../../../lib" /fixed:no
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF "$(CFG)" == "mfcchatC - Win32 Debug Static"
+
+# PROP BASE Use_MFC 6
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "mfcchatC___Win32_Debug_Static"
+# PROP BASE Intermediate_Dir "mfcchatC___Win32_Debug_Static"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 6
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "DebugStatic"
+# PROP Intermediate_Dir "DebugStatic"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "." /I "../../../../include" /I "../../../../include/stlport" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /YX"stdafx.h" /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "." /I "../../../include" /D "_DEBUG" /D "ICEE_STATIC_LIBS" /D "WIN32_LEAN_AND_MEAN" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /YX"stdafx.h" /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
+# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 iceEd.lib /nologo /subsystem:windows /debug /machine:I386 /out:"server.exe" /pdbtype:sept /libpath:"../../../../lib"
+# SUBTRACT BASE LINK32 /incremental:no
+# ADD LINK32 ws2_32.lib rpcrt4.lib /nologo /subsystem:windows /debug /machine:I386 /out:"mfcclient.exe" /pdbtype:sept /libpath:"../../../../lib" /fixed:no
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF "$(CFG)" == "mfcchatC - Win32 Release Static"
+
+# PROP BASE Use_MFC 6
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "mfcchatC___Win32_Release_Static"
+# PROP BASE Intermediate_Dir "mfcchatC___Win32_Release_Static"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 6
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "ReleaseStatic"
+# PROP Intermediate_Dir "ReleaseStatic"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /W3 /GR /GX /O2 /I "." /I "../../../../include" /I "../../../../include/stlport" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /YX"stdafx.h" /FD /c
+# ADD CPP /nologo /MD /W3 /GR /GX /O1 /I "." /I "../../../include" /D "NDEBUG" /D "ICEE_STATIC_LIBS" /D "WIN32_LEAN_AND_MEAN" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /YX"stdafx.h" /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
+# ADD RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 iceE.lib /nologo /subsystem:windows /incremental:yes /machine:I386 /out:"server.exe" /libpath:"../../../../lib"
+# ADD LINK32 ws2_32.lib rpcrt4.lib /nologo /subsystem:windows /machine:I386 /out:"mfcclient.exe" /libpath:"../../../../lib"
+# SUBTRACT LINK32 /incremental:yes
+
+!ENDIF
+
+# Begin Target
+
+# Name "mfcchatC - Win32 Release"
+# Name "mfcchatC - Win32 Debug"
+# Name "mfcchatC - Win32 Debug Static"
+# Name "mfcchatC - Win32 Release Static"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\Chat.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\ChatClient.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\ChatClient.rc
+# End Source File
+# Begin Source File
+
+SOURCE=.\ChatClientDlg.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\LogI.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Router.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Session.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\StdAfx.cpp
+# ADD CPP /Yc"stdafx.h"
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\Chat.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\ChatClient.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\ChatClientDlg.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\LogI.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Resource.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Router.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Session.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\StdAfx.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\Chat.ice
+
+!IF "$(CFG)" == "mfcchatC - Win32 Release"
+
+# Begin Custom Build
+InputPath=.\Chat.ice
+
+BuildCmds= \
+ slice2cppe.exe -I. Chat.ice
+
+"Chat.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Chat.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "mfcchatC - Win32 Debug"
+
+# Begin Custom Build
+InputPath=.\Chat.ice
+
+BuildCmds= \
+ slice2cppe.exe -I. Chat.ice
+
+"Chat.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Chat.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "mfcchatC - Win32 Debug Static"
+
+# Begin Custom Build
+InputPath=.\Chat.ice
+
+BuildCmds= \
+ slice2cppe.exe -I. Chat.ice
+
+"Chat.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Chat.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "mfcchatC - Win32 Release Static"
+
+# Begin Custom Build
+InputPath=.\Chat.ice
+
+BuildCmds= \
+ slice2cppe.exe -I. Chat.ice
+
+"Chat.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Chat.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\res\ChatClient.ico
+# End Source File
+# Begin Source File
+
+SOURCE=.\res\ChatClient.rc2
+# End Source File
+# Begin Source File
+
+SOURCE=.\Router.ice
+
+!IF "$(CFG)" == "mfcchatC - Win32 Release"
+
+# Begin Custom Build
+InputPath=.\Router.ice
+
+BuildCmds= \
+ slice2cppe.exe -I. -I../../../slice Router.ice
+
+"Router.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Router.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "mfcchatC - Win32 Debug"
+
+# Begin Custom Build
+InputPath=.\Router.ice
+
+BuildCmds= \
+ slice2cppe.exe -I. -I../../../slice Router.ice
+
+"Router.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Router.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "mfcchatC - Win32 Debug Static"
+
+# Begin Custom Build
+InputPath=.\Router.ice
+
+BuildCmds= \
+ slice2cppe.exe -I. -I../../../slice Router.ice
+
+"Router.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Router.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "mfcchatC - Win32 Release Static"
+
+# Begin Custom Build
+InputPath=.\Router.ice
+
+BuildCmds= \
+ slice2cppe.exe -I. -I../../../slice Router.ice
+
+"Router.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Router.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\Session.ice
+
+!IF "$(CFG)" == "mfcchatC - Win32 Release"
+
+# Begin Custom Build
+InputPath=.\Session.ice
+
+BuildCmds= \
+ slice2cppe.exe Session.ice
+
+"Session.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Session.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "mfcchatC - Win32 Debug"
+
+# Begin Custom Build
+InputPath=.\Session.ice
+
+BuildCmds= \
+ slice2cppe.exe Session.ice
+
+"Session.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Session.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "mfcchatC - Win32 Debug Static"
+
+# Begin Custom Build
+InputPath=.\Session.ice
+
+BuildCmds= \
+ slice2cppe.exe Session.ice
+
+"Session.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Session.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "mfcchatC - Win32 Release Static"
+
+# Begin Custom Build
+InputPath=.\Session.ice
+
+BuildCmds= \
+ slice2cppe.exe Session.ice
+
+"Session.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Session.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/cppe/demo/IceE/chat/res/ChatClient.ico b/cppe/demo/IceE/chat/res/ChatClient.ico Binary files differnew file mode 100644 index 00000000000..8a84ca3d345 --- /dev/null +++ b/cppe/demo/IceE/chat/res/ChatClient.ico diff --git a/cppe/demo/IceE/chat/res/ChatClient.rc2 b/cppe/demo/IceE/chat/res/ChatClient.rc2 new file mode 100644 index 00000000000..a1bee52831b --- /dev/null +++ b/cppe/demo/IceE/chat/res/ChatClient.rc2 @@ -0,0 +1,13 @@ +//
+// ChatClient.RC2 - resources Microsoft Visual C++ does not edit directly
+//
+
+#ifdef APSTUDIO_INVOKED
+#error this file is not editable by Microsoft Visual C++
+#endif //APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+// Add manually edited resources here...
+
+/////////////////////////////////////////////////////////////////////////////
diff --git a/cppe/demo/IceE/chat/resource.h b/cppe/demo/IceE/chat/resource.h new file mode 100755 index 00000000000..65161babd9f --- /dev/null +++ b/cppe/demo/IceE/chat/resource.h @@ -0,0 +1,22 @@ +//{{NO_DEPENDENCIES}}
+// Microsoft Developer Studio generated include file.
+// Used by ChatClient.rc
+//
+#define IDD_HELLOSERVER_DIALOG 101
+#define IDD_CHATCLIENT_DIALOG 101
+#define IDR_MAINFRAME 128
+#define IDC_SHUTDOWN 1001
+#define IDC_SEND 1002
+#define IDC_LOG 1003
+#define IDC_LOG2 1004
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 130
+#define _APS_NEXT_COMMAND_VALUE 32771
+#define _APS_NEXT_CONTROL_VALUE 1004
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/cppe/demo/IceE/chat/stdafx.cpp b/cppe/demo/IceE/chat/stdafx.cpp new file mode 100644 index 00000000000..4a30a6e7fa3 --- /dev/null +++ b/cppe/demo/IceE/chat/stdafx.cpp @@ -0,0 +1,17 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2005 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +
+// stdafx.cpp : source file that includes just the standard includes
+// ChatClient.pch will be the pre-compiled header
+// stdafx.obj will contain the pre-compiled type information
+
+#include "stdafx.h"
+
+
diff --git a/cppe/demo/IceE/chat/stdafx.h b/cppe/demo/IceE/chat/stdafx.h new file mode 100644 index 00000000000..df513810f23 --- /dev/null +++ b/cppe/demo/IceE/chat/stdafx.h @@ -0,0 +1,65 @@ +// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently, but
+// are changed infrequently
+//
+
+
+#if !defined(AFX_STDAFX_H__CCAD4B79_862C_4DFB_A13B_E56154F5C0B8__INCLUDED_)
+#define AFX_STDAFX_H__CCAD4B79_862C_4DFB_A13B_E56154F5C0B8__INCLUDED_
+
+#if _MSC_VER >= 1000
+#pragma once
+#endif // _MSC_VER >= 1000
+
+#ifndef UNDER_CE
+
+#if !defined(NDEBUG) && !defined(_STLP_DEBUG)
+# define _STLP_DEBUG
+#endif
+
+#ifndef WINVER
+#define WINVER 0x0400
+#endif
+
+#ifndef _WIN32_WINNT
+#define _WIN32_WINNT 0x0400
+#endif
+
+#else
+
+#if (_WIN32_WCE <= 200)
+#error : This project does not support MFCCE 2.00 or earlier, because it requires CControlBar, available only in MFCCE 2.01 or later
+#endif
+
+//
+// _STLP_USE_MFC must be defined. We don't use iostreams so lets turn that off too.
+//
+#define _STLP_USE_MFC
+#define _STLP_NO_OWN_IOSTREAMS
+#define _STLP_NO_NEW_IOSTREAMS
+#define _STLP_NO_IOSTREAMS
+
+#endif // UNDER_CE
+
+#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
+
+#include <afxwin.h> // MFC core and standard components
+#include <afxext.h> // MFC extensions
+
+#if defined(_WIN32_WCE) && (_WIN32_WCE >= 211) && (_AFXDLL)
+#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
+#endif
+
+
+#ifndef _AFX_NO_AFXCMN_SUPPORT
+#include <afxcmn.h> // MFC support for Windows Common Controls
+#endif // _AFX_NO_AFXCMN_SUPPORT
+
+#include <afxsock.h> // MFC socket extensions
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft eMbedded Visual C++ will insert additional declarations immediately before the previous line.
+
+#include <IceE/IceE.h>
+
+#endif // !defined(AFX_STDAFX_H__CCAD4B79_862C_4DFB_A13B_E56154F5C0B8__INCLUDED_)
|