www.gusucode.com > VC++开发的通信串口编程的一部分,主要测试接口的正确性, > VC++开发的通信串口编程的一部分,主要测试接口的正确性,源代码还有简单的说明,能够运行成功/TAPICase/TAPICaseDoc.cpp
// TAPICaseDoc.cpp : implementation of the CTAPICaseDoc class // #include "stdafx.h" #include "TAPICase.h" #include "TAPICaseDoc.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CTAPICaseDoc IMPLEMENT_DYNCREATE(CTAPICaseDoc, CDocument) BEGIN_MESSAGE_MAP(CTAPICaseDoc, CDocument) //{{AFX_MSG_MAP(CTAPICaseDoc) // NOTE - the ClassWizard will add and remove mapping macros here. // DO NOT EDIT what you see in these blocks of generated code! //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CTAPICaseDoc construction/destruction CTAPICaseDoc::CTAPICaseDoc() { // TODO: add one-time construction code here } CTAPICaseDoc::~CTAPICaseDoc() { } BOOL CTAPICaseDoc::OnNewDocument() { if (!CDocument::OnNewDocument()) return FALSE; // TODO: add reinitialization code here // (SDI documents will reuse this document) return TRUE; } ///////////////////////////////////////////////////////////////////////////// // CTAPICaseDoc serialization void CTAPICaseDoc::Serialize(CArchive& ar) { if (ar.IsStoring()) { // TODO: add storing code here } else { // TODO: add loading code here } } ///////////////////////////////////////////////////////////////////////////// // CTAPICaseDoc diagnostics #ifdef _DEBUG void CTAPICaseDoc::AssertValid() const { CDocument::AssertValid(); } void CTAPICaseDoc::Dump(CDumpContext& dc) const { CDocument::Dump(dc); } #endif //_DEBUG ///////////////////////////////////////////////////////////////////////////// // CTAPICaseDoc commands