MFC OnFileNew problem

I recently started a Word style application in MFC that utilises an MDI template. The way that the documents for it are saved though require extra information than what the default CRichEditView normally handles. To take care of this problem I overloaded the OnFileNew event. The problem I have though is that I don't know how to actually make the new file. I know how to get existing files using the GetDocument method but that's about it. Here is the code that I have so far for the overload.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
void CTimeCapsuleView::OnFileNew()
{
	// TODO: Add your command handler code here
	CSetDateDlg dlg;

	if( dlg.DoModal() == IDOK )
	{
		CTimeCapsuleDoc *pDoc = I don't know what goes here!;

		pDoc->SetTitle( _T("Title") );
		pDoc->m_Version;
		pDoc->m_Signature;
		pDoc->m_PresentDate = dlg.m_PresentDate;
		pDoc->m_OpenDate = dlg.m_OpenDate;
	}
} 
Last edited on
Never mind I figured out what I was doing wrong. I should have been modifying the PreCreateWindow method of my view class.
Topic archived. No new replies allowed.