// mymfc20Doc.cpp : implementation of the CMymfc20Doc class
//

#include "stdafx.h"
#include "mymfc20.h"

#include "mymfc20Doc.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CMymfc20Doc

IMPLEMENT_DYNCREATE(CMymfc20Doc, CDocument)

BEGIN_MESSAGE_MAP(CMymfc20Doc, CDocument)
	//{{AFX_MSG_MAP(CMymfc20Doc)
		// 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()

/////////////////////////////////////////////////////////////////////////////
// CMymfc20Doc construction/destruction

CMymfc20Doc::CMymfc20Doc()
{
	// TODO: add one-time construction code here

}

CMymfc20Doc::~CMymfc20Doc()
{
}

BOOL CMymfc20Doc::OnNewDocument()
{
	if (!CDocument::OnNewDocument())
        return FALSE;

    int n1, n2, n3;
    // Make 50 random circles
    srand((unsigned) time(NULL));
    m_ellipseArray.SetSize(nMaxEllipses);

    for (int i = 0; i < nMaxEllipses; i++)
    {
        n1 = rand() * 600 / RAND_MAX;
        n2 = rand() * 600 / RAND_MAX;
        n3 = rand() * 50  / RAND_MAX;
        m_ellipseArray[i] = CRect(n1, -n2, n1 + n3, -(n2 + n3));
    }

    return TRUE;
}



/////////////////////////////////////////////////////////////////////////////
// CMymfc20Doc serialization

void CMymfc20Doc::Serialize(CArchive& ar)
{
	m_ellipseArray.Serialize(ar);
}

/////////////////////////////////////////////////////////////////////////////
// CMymfc20Doc diagnostics

#ifdef _DEBUG
void CMymfc20Doc::AssertValid() const
{
	CDocument::AssertValid();
}

void CMymfc20Doc::Dump(CDumpContext& dc) const
{
	CDocument::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CMymfc20Doc commands

