Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
PeeperClientDoc.cpp
Package: TOUKUI-1.5.zip [view]
Upload User: xztxsm
Upload Date: 2007-02-12
Package Size: 150k
Code Size: 2k
Category:
Remote Control
Development Platform:
Visual C++
- #include "stdafx.h"
- #include "PeeperClient.h"
- #include "PeeperClientDoc.h"
- #include "PeeperFrm.h"
- #include "PeeperSetDlg.h"
- #include "../peeperlib.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- IMPLEMENT_DYNCREATE(CPeeperClientDoc, CDocument)
- BEGIN_MESSAGE_MAP(CPeeperClientDoc, CDocument)
- //{{AFX_MSG_MAP(CPeeperClientDoc)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- CPeeperClientDoc::CPeeperClientDoc()
- {
- }
- CPeeperClientDoc::~CPeeperClientDoc()
- {
- }
- BOOL CPeeperClientDoc::OnNewDocument()
- {
- if (!CDocument::OnNewDocument())
- return FALSE;
- CPeeperSetDlg dlgSet;
- if(dlgSet.DoModal() != IDOK)
- {
- return FALSE;
- }
- m_strIP = dlgSet.m_strIP;
- m_uPort = dlgSet.m_uPort;
- m_nBits = dlgSet.m_nBits;
- m_nSpeed = dlgSet.m_nSpeed;
- return TRUE;
- }
- #define PEEPER_VERSION _T("PPV1.1")
- void CPeeperClientDoc::Serialize(CArchive& ar)
- {
- if (ar.IsStoring())
- {
- ar << PEEPER_SERVER_VER_15;
- ar << m_strIP;
- ar << m_uPort;
- ar << m_nBits;
- ar << m_nSpeed;
- }
- else
- {
- CString strVer;
- ar >> strVer;
- if((strVer.CompareNoCase(PEEPER_VERSION) == 0) ||
- (strVer.CompareNoCase(PEEPER_SERVER_VER_15) == 0))
- {
- ar >> m_strIP;
- ar >> m_uPort;
- ar >> m_nBits;
- ar >> m_nSpeed;
- }
- else
- {
- m_strIP = _T("127.0.0.1");
- m_uPort = PL_PEEPER_PORT;
- m_nBits = 4;
- m_nSpeed = 1000;
- }
- }
- }
- void CPeeperClientDoc::OnCloseDocument()
- {
- CDocument::OnCloseDocument();
- ((CMainFrame *)AfxGetApp()->m_pMainWnd)->OnFileClose();
- }