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

Opening multipe documents of several types at once

Rate me:
Please Sign up or sign in to vote.
4.12/5 (9 votes)
15 May 2004CPOL2 min read 64.1K   1.3K   21  
This class provides an open file dialog that shows multiple file types at once, and allows selecting multiple files at once.
// DocManager2DemoDoc.cpp : implementation of the CHappyDoc class
//

#include "stdafx.h"
#include "DocManager2Demo.h"

#include "DocManager2DemoDoc.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// CHappyDoc

IMPLEMENT_DYNCREATE(CHappyDoc, CDocument)

BEGIN_MESSAGE_MAP(CHappyDoc, CDocument)
END_MESSAGE_MAP()


// CHappyDoc construction/destruction

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

}

CHappyDoc::~CHappyDoc()
{
}

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

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

	return TRUE;
}




// CHappyDoc serialization

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


// CHappyDoc diagnostics

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

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


// CHappyDoc 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
Web Developer
Mexico Mexico
@Work : Doing UML modelling for food
@Home : Still coding for fun!

Comments and Discussions