Click here to Skip to main content
15,896,201 members
Articles / Desktop Programming / MFC

Plug-in DLLs and Menu Interfaces

Rate me:
Please Sign up or sign in to vote.
4.76/5 (20 votes)
14 Sep 2005CPOL5 min read 78.6K   3.3K   104  
An article on installing a menu interface for a load-on-demand DLL.
// TargetAppDoc.cpp : implementation of the CTargetAppDoc class
//
/*
** Copyright 2005 by Michael Bergman
** See the enclose ReadMe.txt file for terms 
** conditions. 
*/


#include "stdafx.h"
#include "TargetApp.h"

#include "TargetAppDoc.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// CTargetAppDoc

IMPLEMENT_DYNCREATE(CTargetAppDoc, CDocument)

BEGIN_MESSAGE_MAP(CTargetAppDoc, CDocument)
END_MESSAGE_MAP()


// CTargetAppDoc construction/destruction

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

}

CTargetAppDoc::~CTargetAppDoc()
{
}

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

	reinterpret_cast<CEditView*>(m_viewList.GetHead())->SetWindowText(NULL);

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

	return TRUE;
}




// CTargetAppDoc serialization

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


// CTargetAppDoc diagnostics

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

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


// CTargetAppDoc 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)
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions