edensheiko

SAVE_FILE_Shape by eden

May 21st, 2021
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. const TCHAR  czFilter[] = _T("Shape files (*.shape)|*.shape|ALL Files (*.*)|*.*||");
  2.     CFileDialog fDialog(TRUE, _T("shapes"), NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, czFilter, this);
  3.     if (fDialog.DoModal() == IDOK)
  4.     {
  5.         CString fileName = fDialog.GetPathName();
  6.         CFile file(fileName, CFile::modeRead);
  7.         CArchive ar(&file, CArchive::load);
  8.         shapes.Serialize(ar);
  9.         ar.Close();
  10.         file.Close();
  11.         Invalidate();
  12.     }
Advertisement
Add Comment
Please, Sign In to add comment