검색어 입력폼
평가점수A

MFC 1 대 1 채팅 프로그램 졸업작품

저작시기 2013.04 |등록일 2013.04.18 파일확장자압축파일 (zip) | 가격 2,000원

소개글

현직 개발자가 직접 만든 1 대 1 채팅프로그램입니다.

소스를 다운받아 보면 알겠지만, 개발 노하우들이 많이 있습니다.

현재 존재하는 채팅프로그램과의 차이점
1. 하나의 프로그램에 서버와 클라이언트 기능 구현
2. 프로그램 디자인 간편하게 변경 가능( 버튼이미지, 배경색, 글자색 등)

1 대 1 채팅프로그램이 필요하여 구매하신다면 후회없는 선택이 되실 것 입니다.
감사합니다.

void CLiveChatView::Connect()
{
CSubChat* m_SubChat = static_cast(m_wndPile.GetWnd(PDI_CHAT));
if( m_pFrame->m_pDoc->m_LiveChatData.m_SystemPage.m_Network.nNetworkType == DF_SERVER )
{
if( m_pClient )
{
m_pClient->CloseSocket();

delete m_pClient; // Client Socket 삭제
m_pClient = NULL;
}

for(int i=0; i {
if( m_SocketManager[i].IsOpen() )
{
m_SocketManager[i].StopComm();
}
//m_SocketManager[i].SetMessageWindow( &m_ctlMsgList );
m_SocketManager[i].SetMessageWindow( &m_SubChat->m_ctlMsgList );
m_SocketManager[i].m_pMsgCtrlView = &m_ctlMsgList;
//m_SocketManager[i].m_pctlListMsg = &m_SubChat->m_ctlListMsg;
m_SocketManager[i].SetServerState( true ); // run as server
}

PickNextAvailable();

m_strPort = m_pFrame->m_pDoc->m_LiveChatData.m_SystemPage.m_Network.strPort;
StartServer(); // Socket 활성화
//m_SubChat->m_ctlMsgList.SetWindowText("서버가 시작되었습니다.\r\n");
setEditText("서버가 시작되었습니다.");

}
else if( m_pFrame->m_pDoc->m_LiveChatData.m_SystemPage.m_Network.nNetworkType == DF_CLIENT )
{
if( m_pClient )
{
m_pClient->CloseSocket();

delete m_pClient; // Client Socket 삭제
m_pClient = NULL;
}

for(int i=0; i {
if( m_SocketManager[i].IsOpen() )
{
m_SocketManager[i].StopComm();
}
}

m_pClient = new CDeviceSocket;

if( m_pClient )
{
m_pClient->CreateSocket();
// 연결 실패
if( m_pClient->ConnectSocket(m_pFrame->m_pDoc->m_LiveChatData.m_SystemPage.m_Network.strServerIP,
m_pFrame->m_pDoc->m_LiveChatData.m_SystemPage.m_Network.strPort, &m_SubChat->m_ctlMsgList, &m_ctlMsgList) == FALSE)
{
m_pClient->CloseSocket();

delete m_pClient; // Client Socket 삭제
m_pClient = NULL;
}
else
{
//m_pClient->SendData("Server Test");
}
}
}
}

컴파일 실행환경

Visual Studio 2010, Windows XP

압축파일내 파일목록

LiveChat.sln
LiveChat.suo
LiveChat/ApxIniEx.cpp
LiveChat/ApxIniEx.h
LiveChat/BtnST.cpp
LiveChat/BtnST.h
LiveChat/Define.h
LiveChat/DeviceSocket.cpp
LiveChat/DeviceSocket.h
LiveChat/LiveChat.aps
LiveChat/LiveChat.cpp
LiveChat/LiveChat.h
LiveChat/LiveChat.rc
LiveChat/LiveChat.vcxproj
LiveChat/LiveChat.vcxproj.filters
LiveChat/LiveChat.vcxproj.user
LiveChat/LiveChatData.cpp
LiveChat/LiveChatData.h
LiveChat/LiveChatDoc.cpp
LiveChat/LiveChatDoc.h
LiveChat/LiveChatView.cpp
LiveChat/LiveChatView.h
LiveChat/MainFrm.cpp
LiveChat/MainFrm.h
LiveChat/PileWnd.cpp
LiveChat/PileWnd.h
LiveChat/ReadMe.txt
LiveChat/resource.h
LiveChat/SocketComm.cpp
LiveChat/SocketComm.h
LiveChat/SocketManager.cpp
LiveChat/SocketManager.h
LiveChat/stdafx.cpp
LiveChat/stdafx.h
LiveChat/SubChat.cpp
LiveChat/SubChat.h
LiveChat/SubConfig.cpp
LiveChat/SubConfig.h
LiveChat/SubDlg.cpp
LiveChat/SubDlg.h
LiveChat/targetver.h
LiveChat/ThemeHelperST.cpp
LiveChat/ThemeHelperST.h
LiveChat/UserImages.bmp
LiveChat/XPStyleButtonST.cpp
LiveChat/XPStyleButtonST.h
LiveChat/ini/LiveChat.ini
LiveChat/res/Btn_Button_Normal.bmp
LiveChat/res/Btn_Main_Button_Normal.bmp
LiveChat/res/LiveChat.ico
LiveChat/res/LiveChat.rc2
LiveChat/res/LiveChatDoc.ico
LiveChat/res/Thumbs.db
LiveChat/res/Toolbar.bmp
LiveChat/res/Toolbar256.bmp
Release/ini/LiveChat.ini
Release/res/Btn_Button_Normal.bmp
Release/res/Btn_Main_Button_Normal.bmp
Release/res/LiveChat.ico
Release/res/LiveChat.rc2
Release/res/LiveChatDoc.ico
Release/res/Thumbs.db
Release/res/Toolbar.bmp
Release/res/Toolbar256.bmp
다운로드 맨위로