Click here to Skip to main content
15,894,177 members
Articles / Desktop Programming / MFC

Spying a file system

Rate me:
Please Sign up or sign in to vote.
4.26/5 (49 votes)
22 Sep 2003CPOL3 min read 406.2K   7.2K   124  
Article describes how to create a file system spy application
// FileSpyDoc.cpp : implementation of the CFileSpyDoc class
//

#include "stdafx.h"
#include "FileSpy.h"

#include "FileSpyDoc.h"

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

/////////////////////////////////////////////////////////////////////////////
// CFileSpyDoc

IMPLEMENT_DYNCREATE(CFileSpyDoc, CDocument)

BEGIN_MESSAGE_MAP(CFileSpyDoc, CDocument)
	//{{AFX_MSG_MAP(CFileSpyDoc)
		// 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()

/////////////////////////////////////////////////////////////////////////////
// CFileSpyDoc construction/destruction

CFileSpyDoc::CFileSpyDoc()
{
	// TODO: add one-time construction code here

}

CFileSpyDoc::~CFileSpyDoc()
{
}

BOOL CFileSpyDoc::OnNewDocument()
{
	if (!CDocument::OnNewDocument())
		return FALSE;

	// TODO: add reinitialization code here
	// (SDI documents will reuse this document)

	return TRUE;
}



/////////////////////////////////////////////////////////////////////////////
// CFileSpyDoc serialization

void CFileSpyDoc::Serialize(CArchive& ar)
{
	if (ar.IsStoring())
	{
		// TODO: add storing code here
	}
	else
	{
		// TODO: add loading code here
	}
}

/////////////////////////////////////////////////////////////////////////////
// CFileSpyDoc diagnostics

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

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

/////////////////////////////////////////////////////////////////////////////
// CFileSpyDoc commands

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Europe Europe
I am a professional Software Developer with more than 20 years' experience.

I am open for contacts and interesting ideas.
You can write me at:
vitali_eh@yahoo.com

Comments and Discussions