Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const TCHAR czFilter[] = _T("Shape files (*.shape)|*.shape|ALL Files (*.*)|*.*||");
- CFileDialog fDialog(TRUE, _T("shapes"), NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, czFilter, this);
- if (fDialog.DoModal() == IDOK)
- {
- CString fileName = fDialog.GetPathName();
- CFile file(fileName, CFile::modeRead);
- CArchive ar(&file, CArchive::load);
- shapes.Serialize(ar);
- ar.Close();
- file.Close();
- Invalidate();
- }
Advertisement
Add Comment
Please, Sign In to add comment