-
大小: 3.66MB文件類型: .rar金幣: 2下載: 0 次發(fā)布日期: 2023-10-01
- 語言: C/C++
- 標簽: MFC??網(wǎng)絡時鐘??
資源簡介
設計內(nèi)容:通過網(wǎng)絡在客戶端計算機和服務器端計算機之間傳送計算機的時鐘信息,在某臺計算機上可以顯示網(wǎng)絡上其他計算機的時鐘信息。
基本要求:
操作員在服務器端計算機上發(fā)出發(fā)送時鐘信息命令,服務器端計算機上顯示本機時鐘信息,并將服務器計算機上時鐘信息通過網(wǎng)絡發(fā)送到每個客戶計算機上,客戶計算機上顯示服務器端計算機時鐘信息。
操作員在客戶計算機上發(fā)出發(fā)送本機時鐘信息命令給服務器端計算機,服務器端計算機顯示客戶端計算機的時鐘信息。
提高要求:
客戶端計算機動態(tài)顯示當前服務器端計算機時鐘信息。
服務器端計算機可同時顯示多個連接的客戶機上的時鐘信息。
服務器端計算機可修改指定客戶機上的時鐘。
客戶端計算機修改

代碼片段和文件信息
//?09003711B.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“09003711B.h“
#include?“09003711BDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CMy09003711BApp
BEGIN_MESSAGE_MAP(CMy09003711BApp?CWinApp)
//{{AFX_MSG_MAP(CMy09003711BApp)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//????DO?NOT?EDIT?what?you?see?in?these?blocks?of?generated?code!
//}}AFX_MSG
ON_COMMAND(ID_HELP?CWinApp::onhelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CMy09003711BApp?construction
CMy09003711BApp::CMy09003711BApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CMy09003711BApp?object
CMy09003711BApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CMy09003711BApp?initialization
BOOL?CMy09003711BApp::InitInstance()
{
if?(!AfxSocketInit())
{
AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
return?FALSE;
}
AfxEnableControlContainer();
//?Standard?initialization
//?If?you?are?not?using?these?features?and?wish?to?reduce?the?size
//??of?your?final?executable?you?should?remove?from?the?following
//??the?specific?initialization?routines?you?do?not?need.
#ifdef?_AFXDLL
Enable3dControls(); //?Call?this?when?using?MFC?in?a?shared?DLL
#else
Enable3dControlsStatic(); //?Call?this?when?linking?to?MFC?statically
#endif
CMy09003711BDlg?dlg;
m_pMainWnd?=?&dlg;
int?nResponse?=?dlg.DoModal();
if?(nResponse?==?IDOK)
{
//?TODO:?Place?code?here?to?handle?when?the?dialog?is
//??dismissed?with?OK
}
else?if?(nResponse?==?IDCANCEL)
{
//?TODO:?Place?code?here?to?handle?when?the?dialog?is
//??dismissed?with?Cancel
}
//?Since?the?dialog?has?been?closed?return?FALSE?so?that?we?exit?the
//??application?rather?than?start?the?application‘s?message?pump.
return?FALSE;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????36384??2012-06-20?21:48??客戶端\09003711B.APS
?????文件???????1678??2012-06-21?12:31??客戶端\09003711B.clw
?????文件???????2221??2012-06-19?09:22??客戶端\09003711B.cpp
?????文件???????4410??2012-06-16?23:59??客戶端\09003711B.dsp
?????文件???????1367??2012-06-19?09:22??客戶端\09003711B.h
?????文件??????41984??2012-07-12?16:27??客戶端\09003711B.ncb
?????文件??????53760??2012-07-12?16:27??客戶端\09003711B.opt
?????文件???????1879??2012-07-12?16:27??客戶端\09003711B.plg
?????文件???????5897??2012-06-20?21:48??客戶端\09003711B.rc
?????文件???????6602??2012-06-21?08:30??客戶端\09003711BDlg.cpp
?????文件???????1613??2012-06-19?09:23??客戶端\09003711BDlg.h
?????文件???????1549??2012-06-20?21:48??客戶端\ClientSocket.cpp
?????文件???????1192??2012-06-21?08:32??客戶端\ClientSocket.h
?????文件?????110661??2012-07-12?16:27??客戶端\Debug\09003711B.exe
?????文件?????234932??2012-07-12?16:27??客戶端\Debug\09003711B.ilk
?????文件??????14465??2012-07-12?16:27??客戶端\Debug\09003711B.obj
?????文件????5575884??2012-07-12?16:27??客戶端\Debug\09003711B.pch
?????文件?????295936??2012-07-12?16:27??客戶端\Debug\09003711B.pdb
?????文件???????2908??2012-07-12?16:27??客戶端\Debug\09003711B.res
?????文件??????32882??2012-07-12?16:27??客戶端\Debug\09003711BDlg.obj
?????文件???????6867??2012-07-12?16:27??客戶端\Debug\ClientSocket.obj
?????文件?????106544??2012-07-12?16:27??客戶端\Debug\StdAfx.obj
?????文件?????205824??2012-07-12?16:27??客戶端\Debug\vc60.idb
?????文件?????364544??2012-07-12?16:27??客戶端\Debug\vc60.pdb
?????文件???????3639??2012-06-16?23:48??客戶端\ReadMe.txt
?????文件???????1078??2012-06-16?23:48??客戶端\res\09003711B.ico
?????文件????????401??2012-06-16?23:48??客戶端\res\09003711B.rc2
?????文件????????962??2012-06-17?00:01??客戶端\resource.h
?????文件????????211??2012-06-16?23:48??客戶端\StdAfx.cpp
?????文件???????1102??2012-06-16?23:48??客戶端\StdAfx.h
............此處省略46個文件信息
- 上一篇:學生信息管理系統(tǒng)C++簡單教學版
- 下一篇:MFC UDP 聊天
評論
共有 條評論