zoukankan      html  css  js  c++  java
  • 用API 现成的函数处理工程退出时的文件保存

    用API 现成的函数处理工程退出时的文件保存,当然也可以直接使用CDocument,通过调用 BOOL CDocument::SaveModified()来实现

      CString prompt;
     AfxFormatString1(prompt, AFX_IDP_ASK_TO_SAVE, name);
     switch (AfxMessageBox(prompt, MB_YESNOCANCEL, AFX_IDP_ASK_TO_SAVE))!!
     {
     case IDCANCEL:
      return FALSE;       // don't continue

     case IDYES:
      // If so, either Save or Update, as appropriate
      if (!DoFileSave())
       return FALSE;       // don't continue
      break;

     case IDNO:
      // If not saving changes, revert the document
      break;

     default:
      ASSERT(FALSE);
      break;
     }

  • 相关阅读:
    第30周日
    第30周六
    第30周五
    第30周四
    第30周三
    第30周二
    第30周一
    第29周日
    软件架构学习小结
    数据挖掘十大经典算法
  • 原文地址:https://www.cnblogs.com/carl2380/p/1915652.html
Copyright © 2011-2022 走看看