www.gusucode.com > VC++利用Hook钩子实现的阴影菜单源码程序 > VC++利用Hook钩子实现的阴影菜单源码程序/code/MenuHookDoc.cpp

    // MenuHookDoc.cpp : implementation of the CMenuHookDoc class
// Download by http://www.NewXing.com

#include "stdafx.h"
#include "MenuHook.h"

#include "MenuHookDoc.h"

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

/////////////////////////////////////////////////////////////////////////////
// CMenuHookDoc

IMPLEMENT_DYNCREATE(CMenuHookDoc, CDocument)

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

/////////////////////////////////////////////////////////////////////////////
// CMenuHookDoc construction/destruction

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

}

CMenuHookDoc::~CMenuHookDoc()
{
}

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

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

	return TRUE;
}



/////////////////////////////////////////////////////////////////////////////
// CMenuHookDoc serialization

void CMenuHookDoc::Serialize(CArchive& ar)
{
	// CEditView contains an edit control which handles all serialization
	((CEditView*)m_viewList.GetHead())->SerializeRaw(ar);
}

/////////////////////////////////////////////////////////////////////////////
// CMenuHookDoc diagnostics

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

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

/////////////////////////////////////////////////////////////////////////////
// CMenuHookDoc commands