Click here to Skip to main content
15,891,184 members
Articles / Programming Languages / C++/CLI

MaChat - a chat with a browser for LANs

Rate me:
Please Sign up or sign in to vote.
4.97/5 (27 votes)
30 Jul 200211 min read 582.5K   12.4K   119  
This article shows how to create a Chat for Local Area Networks which uses the WebBrowser control to display the messages.
<html>
<head>
<META HTTP-EQUIV="Content-Type" content="text/html; charset=windows-1250">
</head>
<body>
<pre>
<table width=100% bgcolor=#CFCFE5><tr> <td> <font face=arial size=+3>
Build Log
</font></table><table width=* cellspacing=0 cellpadding=0><tr><td width=0 bgcolor=#EDEDF5>&nbsp;</td><td width=0 bgcolor=#FFFFFF>&nbsp;</td><td width=*><pre>
<h3>------- Build started: Project: MaChat, Configuration: Release|Win32 -------
</h3>
</pre></table><table width=100% bgcolor=#DFDFE5><tr><td><font face=arial size=+2>
Environment Space
</font></table><table width=* cellspacing=0 cellpadding=0><tr><td width=0 bgcolor=#EDEDF5>&nbsp;</td><td width=0 bgcolor=#FFFFFF>&nbsp;</td><td width=*><pre>    ALLUSERSPROFILE=C:\Documents and Settings\All Users
    APPDATA=C:\Documents and Settings\Michael Mac\Dane aplikacji
    CLIENTNAME=Console
    CommonProgramFiles=C:\Program Files\Common Files
    COMPUTERNAME=MAC
    ComSpec=C:\WINDOWS\system32\cmd.exe
    HOMEDRIVE=C:
    HOMEPATH=\Documents and Settings\Michael Mac
    INCLUDE=E:\SDKs\WMSDK\WMFSDK\include;E:\SDKs\MSXML 4.0\inc;E:\SDKs\MsAgent\include;E:\Microsoft Visual Studio .NET\Vc7\include;E:\Microsoft Visual Studio .NET\Vc7\atlmfc\include;E:\Microsoft Visual Studio .NET\Vc7\PlatformSDK\include\prerelease;E:\Microsoft Visual Studio .NET\Vc7\PlatformSDK\include;E:\SDKs\FrameworkSDK\include;
    LIB=E:\SDKs\WMSDK\WMFSDK\lib;E:\SDKs\MSXML 4.0\lib;E:\Microsoft Visual Studio .NET\Vc7\lib;E:\Microsoft Visual Studio .NET\Vc7\atlmfc\lib;E:\Microsoft Visual Studio .NET\Vc7\PlatformSDK\lib\prerelease;E:\Microsoft Visual Studio .NET\Vc7\PlatformSDK\lib;E:\SDKs\FrameworkSDK\lib;
    LIBPATH=
    LOGONSERVER=\\MAC
    NUMBER_OF_PROCESSORS=1
    NVSDKDX=E:\SDKs\NVSDK\DirectX
    NVSDKGL=E:\SDKs\NVSDK\OpenGL
    OS=Windows_NT
    Path=E:\Microsoft Visual Studio .NET\Vc7\bin;E:\Microsoft Visual Studio .NET\Common7\Tools\bin\prerelease;E:\Microsoft Visual Studio .NET\Common7\Tools\bin;E:\Microsoft Visual Studio .NET\Common7\tools;E:\Microsoft Visual Studio .NET\Common7\ide;C:\Program Files\HTML Help Workshop\;E:\SDKs\FrameworkSDK\bin;C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705;E:\SDKs\FrameworkSDK\Bin\;C:\Program Files\Microsoft Visual Studio .NET\Common7\IDE\;C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\;C:\Program Files\Microsoft Visual Studio .NET\Vc7\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;
    PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
    PROCESSOR_ARCHITECTURE=x86
    PROCESSOR_IDENTIFIER=x86 Family 6 Model 4 Stepping 2, AuthenticAMD
    PROCESSOR_LEVEL=6
    PROCESSOR_REVISION=0402
    ProgramFiles=C:\Program Files
    SESSIONNAME=Console
    SystemDrive=C:
    SystemRoot=C:\WINDOWS
    TEMP=C:\DOCUME~1\MICHAE~1\USTAWI~1\Temp
    TMP=C:\DOCUME~1\MICHAE~1\USTAWI~1\Temp
    USERDOMAIN=MAC
    USERNAME=Michael Mac
    USERPROFILE=C:\Documents and Settings\Michael Mac
    VJSHARPTOOLS=E:\Tools\Microsoft Visual J# .NET\Framework\Bin;C:\WINDOWS\Microsoft Visual JSharp .NET\Framework\v1.0.4205;
    VSCOMNTOOLS="E:\Microsoft Visual Studio .NET\Common7\Tools\"
    windir=C:\WINDOWS
    _ACP_ATLPROV=E:\Microsoft Visual Studio .NET\Vc7\bin\ATLPROV.DLL
    _ACP_INCLUDE=E:\SDKs\WMSDK\WMFSDK\include;E:\SDKs\MSXML 4.0\inc;E:\SDKs\MsAgent\include;E:\Microsoft Visual Studio .NET\Vc7\include;E:\Microsoft Visual Studio .NET\Vc7\atlmfc\include;E:\Microsoft Visual Studio .NET\Vc7\PlatformSDK\include\prerelease;E:\Microsoft Visual Studio .NET\Vc7\PlatformSDK\include;E:\SDKs\FrameworkSDK\include;
    _ACP_LIB=E:\SDKs\WMSDK\WMFSDK\lib;E:\SDKs\MSXML 4.0\lib;E:\Microsoft Visual Studio .NET\Vc7\lib;E:\Microsoft Visual Studio .NET\Vc7\atlmfc\lib;E:\Microsoft Visual Studio .NET\Vc7\PlatformSDK\lib\prerelease;E:\Microsoft Visual Studio .NET\Vc7\PlatformSDK\lib;E:\SDKs\FrameworkSDK\lib;;E:\SDKs\WMSDK\WMFSDK\include;E:\SDKs\MSXML 4.0\inc;E:\SDKs\MsAgent\include;E:\Microsoft Visual Studio .NET\Vc7\include;E:\Microsoft Visual Studio .NET\Vc7\atlmfc\include;E:\Microsoft Visual Studio .NET\Vc7\PlatformSDK\include\prerelease;E:\Microsoft Visual Studio .NET\Vc7\PlatformSDK\include;E:\SDKs\FrameworkSDK\include;
    _ACP_PATH=E:\Microsoft Visual Studio .NET\Vc7\bin;E:\Microsoft Visual Studio .NET\Common7\Tools\bin\prerelease;E:\Microsoft Visual Studio .NET\Common7\Tools\bin;E:\Microsoft Visual Studio .NET\Common7\tools;E:\Microsoft Visual Studio .NET\Common7\ide;C:\Program Files\HTML Help Workshop\;E:\SDKs\FrameworkSDK\bin;C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705;E:\SDKs\FrameworkSDK\Bin\;C:\Program Files\Microsoft Visual Studio .NET\Common7\IDE\;C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\;C:\Program Files\Microsoft Visual Studio .NET\Vc7\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;
</pre></table><table width=100% bgcolor=#DFDFE5><tr><td><font face=arial size=+2>
Command Lines
</font></table><table width=* cellspacing=0 cellpadding=0><tr><td width=0 bgcolor=#EDEDF5>&nbsp;</td><td width=0 bgcolor=#FFFFFF>&nbsp;</td><td width=*><pre>Creating temporary file "c:\Documents and Settings\Michael Mac\Pulpit\MaChatproject\MaChat\obj\Release\RSP00000A.rsp" with contents
[
/Od /Ob1 /AI "C:\Program Files\Microsoft.NET\Primary Interop Assemblies" /AI "bin\Release" /D "WIN32" /D "NDEBUG" /D "_MBCS" /FD /EHsc /MT /GS /Yu"stdafx.h" /Fp"obj\Release/MaChat.pch" /Fo"obj\Release/" /Fd"obj\Release/vc70.pdb" /W4 /c /Zi /clr /TP
"Resources\AssemblyInfo.cpp"
"WebBrowserPage.cpp"
"ChannelPage.cpp"
"WebBrowserEx.cpp"
"Options.cpp"
"Note.cpp"
"MainForm.cpp"
"MaChat.cpp"
"Formatters.cpp"
"ChatProxy.cpp"
"ChannelBrowser.cpp"
]
Creating command line "cl.exe @"c:\Documents and Settings\Michael Mac\Pulpit\MaChatproject\MaChat\obj\Release\RSP00000A.rsp" /nologo"
Creating temporary file "c:\Documents and Settings\Michael Mac\Pulpit\MaChatproject\MaChat\obj\Release\RSP00000B.rsp" with contents
[
/Od /Ob1 /AI "C:\Program Files\Microsoft.NET\Primary Interop Assemblies" /AI "bin\Release" /D "WIN32" /D "NDEBUG" /D "_MBCS" /FD /EHsc /MT /GS /Yc"stdafx.h" /Fp"obj\Release/MaChat.pch" /Fo"obj\Release/" /Fd"obj\Release/vc70.pdb" /W4 /c /Zi /clr /TP
"stdafx.cpp"
]
Creating command line "cl.exe @"c:\Documents and Settings\Michael Mac\Pulpit\MaChatproject\MaChat\obj\Release\RSP00000B.rsp" /nologo"
</pre></table><table width=100% bgcolor=#DFDFE5><tr><td><font face=arial size=+2>
Output Window
</font></table><table width=* cellspacing=0 cellpadding=0><tr><td width=0 bgcolor=#EDEDF5>&nbsp;</td><td width=0 bgcolor=#FFFFFF>&nbsp;</td><td width=*><pre>Compiling...
stdafx.cpp
c:\Documents and Settings\Michael Mac\Pulpit\MaChatproject\MaChat\stdafx.h(16) : fatal error C1107: could not find assembly 'ChatLibrary.dll': please specify the assembly search path using /AI or by setting the LIBPATH environment variable
</pre></table><table width=100% bgcolor=#DFDFE5><tr><td><font face=arial size=+2>
Results
</font></table><table width=* cellspacing=0 cellpadding=0><tr><td width=0 bgcolor=#EDEDF5>&nbsp;</td><td width=0 bgcolor=#FFFFFF>&nbsp;</td><td width=*><pre>
Build log was saved at "file://c:\Documents and Settings\Michael Mac\Pulpit\MaChatproject\MaChat\obj\Release\BuildLog.htm"
MaChat - 1 error(s), 0 warning(s)</pre></table><table   width=100% height=20 bgcolor=#CFCFE5><tr><td><font face=arial size=+2>
</font></table></body></html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Architect macmichal.pl
Poland Poland
Micheal is an independent consultant - www.macmichal.pl.
He's main areas of interest are: DDD\CqRS, TDD, SaaS, Design Patterns, Architecture. He specializes in .Net/C# for the early beginning of it and T-SQL. He's a writer, blogger (blog.macmichal.pl) and speaker.

In his spare time, he's climbing the mountains all over the Europe.

Comments and Discussions