Beispiel #1
0
void CMainFrame::OnFileOpen()
{
    // Bring up the file open dialog
    CFile File;
    CString str = File.OpenFileDialog(0, 0, 0, 0);
    // TODO:
    // Add your own code here. Refer to the tutorial for additional information
}
Beispiel #2
0
void CMainFrame::OnFileOpen()
{
	CFile File;
	CString str = File.OpenFileDialog(0, OFN_FILEMUSTEXIST, _T("Scribble Files (*.dat)\0*.dat\0\0"), this);

	if (!str.IsEmpty())
	{
		// Retrieve the PlotPoint data
		if (m_View.FileOpen(str))
		{
			// Save the filename
			m_PathName = str;
			AddMRUEntry(str);
		}
		else
			m_PathName=_T("");
	}
}