This is my code, and its working fine.
However I would like to remove the file by variable xmlfilepath
which I have mentioned in the OnInitDialog()
BOOL CTestDlg::OnInitDialog()
{
CString xmlfilepath = _T("C:\\Project\\Test\\test.xml");
Navigate(xmlfilepath);
return TRUE;
}
void CTestDlg::OnClose()
{
CDHtmlDialog::OnClose();
remove("C:\\Project\\Test\\test.xml");
}
You probably want something like this:
This is really basic C++ knowledge. I suggest you learn the basics of C++ prior to experimenting with MFC.