⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ipmonitordoc.cpp

📁 WMD驱动编程,本人收集整理的10多个例子和编程环境配置文档,特别是8139驱动,加了许多说明,并测试通过.
💻 CPP
字号:
///////////////////////////////////////////////////////////////////////////////
//
//	(C) Copyright 1999 - 2000 Mark Roddy
//	All Rights Reserved
//
//	Hollis Technology Solutions
//	94 Dow Road
//	Hollis, NH 03049
//	info@hollistech.com
//
//	Synopsis: 
// 
//
//	Version Information:
//
//	$Header: /iphook/usr/IpMonitor/IpMonitorDoc.cpp 2     1/27/00 10:35p Markr $ 
//
///////////////////////////////////////////////////////////////////////////////
// IpMonitorDoc.cpp : implementation of the CIpMonitorDoc class
//

#include "stdafx.h"
#include "IpMonitor.h"
#include "IpMonitorDoc.h"
#include "IpMonitorView.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CIpMonitorDoc

IMPLEMENT_DYNCREATE(CIpMonitorDoc, CDocument)

BEGIN_MESSAGE_MAP(CIpMonitorDoc, CDocument)
	//{{AFX_MSG_MAP(CIpMonitorDoc)
	ON_COMMAND(ID_DOC_CLEAR, OnDocClear)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CIpMonitorDoc construction/destruction

CIpMonitorDoc::CIpMonitorDoc()
{
	theApp.m_theDoc = this;
	m_lineCount = 0;
	m_data.RemoveAll();

}

CIpMonitorDoc::~CIpMonitorDoc()
{
}

BOOL CIpMonitorDoc::OnNewDocument()
{
	if (!CDocument::OnNewDocument()) {

		return FALSE;
	}



	if (theApp.m_theView) {
		//
		// tell our one and only view that it is time to re-init
		//
		theApp.m_theView->reInitView();


	}

	m_lineCount = 0;
	m_data.RemoveAll();

	return TRUE;
}



/////////////////////////////////////////////////////////////////////////////
// CIpMonitorDoc serialization

void CIpMonitorDoc::Serialize(CArchive& ar)
{


	if (ar.IsStoring())
	{
		for (int i = 0; i < m_data.GetSize(); i++) {

			ar << m_data[i];
		}

		SetModifiedFlag(FALSE);
	}
	else
	{
		
	}
}

/////////////////////////////////////////////////////////////////////////////
// CIpMonitorDoc diagnostics

#ifdef _DEBUG
void CIpMonitorDoc::AssertValid() const
{
	CDocument::AssertValid();
}

void CIpMonitorDoc::Dump(CDumpContext& dc) const
{
	CDocument::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CIpMonitorDoc commands

void CIpMonitorDoc::addItem(CString& item)
{
	m_data.Add(item + CString("\r\n"));
	m_lineCount++;
	SetModifiedFlag();

}

void CIpMonitorDoc::OnDocClear() 
{
	m_data.RemoveAll();
	
}
///////////////////////////////////////////////////////////////////////////////
// 
// Change History Log
//
// $Log: /iphook/usr/IpMonitor/IpMonitorDoc.cpp $
// 
// 2     1/27/00 10:35p Markr
// Prepare to release!
//
///////////////////////////////////////////////////////////////////////////////

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -