資源簡介
用VC++實現的DDE server端代碼,client端代碼其實也包括在其中了,debug目錄中有編譯的程序;親自編寫調試的。沒有任何問題,可以與組態王或其他軟件進行DDE通信

代碼片段和文件信息
//?DDEserver.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“DDEserver.h“
#include?“DDEserverDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CDDEserverApp
BEGIN_MESSAGE_MAP(CDDEserverApp?CWinApp)
//{{AFX_MSG_MAP(CDDEserverApp)
//?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()
/////////////////////////////////////////////////////////////////////////////
//?CDDEserverApp?construction
CDDEserverApp::CDDEserverApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CDDEserverApp?object
CDDEserverApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CDDEserverApp?initialization
BOOL?CDDEserverApp::InitInstance()
{
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
CDDEserverDlg?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;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????35940??2013-06-13?16:54??DDEserver\DDEserver.aps
?????文件???????1271??2013-06-13?17:05??DDEserver\DDEserver.clw
?????文件???????2105??2013-06-13?16:17??DDEserver\DDEserver.cpp
?????文件???????4217??2013-06-13?16:53??DDEserver\DDEserver.dsp
?????文件????????543??2013-06-13?16:17??DDEserver\DDEserver.dsw
?????文件???????1357??2013-06-13?16:17??DDEserver\DDEserver.h
?????文件??????41984??2013-06-13?17:06??DDEserver\DDEserver.ncb
?????文件??????53760??2013-06-13?17:06??DDEserver\DDEserver.opt
?????文件???????1301??2013-06-13?17:03??DDEserver\DDEserver.plg
?????文件???????5566??2013-06-13?16:54??DDEserver\DDEserver.rc
?????文件???????7304??2013-06-13?17:05??DDEserver\DDEserverDlg.cpp
?????文件???????1422??2013-06-13?16:34??DDEserver\DDEserverDlg.h
?????文件????3179520??2013-06-13?17:03??DDEserver\Debug\DDEserver.bsc
?????文件?????110668??2013-06-13?17:03??DDEserver\Debug\DDEserver.exe
?????文件?????228428??2013-06-13?17:03??DDEserver\Debug\DDEserver.ilk
?????文件??????14201??2013-06-13?16:52??DDEserver\Debug\DDEserver.obj
?????文件????6931704??2013-06-13?16:52??DDEserver\Debug\DDEserver.pch
?????文件?????386048??2013-06-13?17:03??DDEserver\Debug\DDEserver.pdb
?????文件???????2856??2013-06-13?16:54??DDEserver\Debug\DDEserver.res
?????文件??????????0??2013-06-13?16:52??DDEserver\Debug\DDEserver.sbr
?????文件??????31853??2013-06-13?17:03??DDEserver\Debug\DDEserverDlg.obj
?????文件??????????0??2013-06-13?17:03??DDEserver\Debug\DDEserverDlg.sbr
?????文件?????105686??2013-06-13?16:52??DDEserver\Debug\StdAfx.obj
?????文件????1374898??2013-06-13?16:52??DDEserver\Debug\StdAfx.sbr
?????文件?????205824??2013-06-13?17:03??DDEserver\Debug\vc60.idb
?????文件?????372736??2013-06-13?17:03??DDEserver\Debug\vc60.pdb
?????文件???????3633??2013-06-13?16:17??DDEserver\ReadMe.txt
?????文件???????1078??2013-06-13?16:17??DDEserver\res\DDEserver.ico
?????文件????????401??2013-06-13?16:17??DDEserver\res\DDEserver.rc2
?????文件????????733??2013-06-13?16:25??DDEserver\Resource.h
............此處省略8個文件信息
- 上一篇:孫鑫VC++深入詳解教程(全20講)PPT講義及源代碼
- 下一篇:MFC各種遍歷
評論
共有 條評論