zoukankan      html  css  js  c++  java
  • 文件默认路径保存批处理

    文件默认路径保存批处理

    BOOL CLeadShowMultiDocTemplate::SaveAllModified(void)
    {
     POSITION pos = GetFirstDocPosition();
     while (pos != NULL)
     {
      CDocument* pDoc = GetNextDoc(pos);
      // --------------------     old       --------------------------
      // The default implementation of this function displays a message box asking the user whether to save the changes to the document,
      // if any have been made. Override this function if your program requires a different prompting procedure. This is an advanced overridable.
      //
      //if (!pDoc->SaveModified())
      // return FALSE;
      // --------------------     new       --------------------------
      // for save all moidied do not need displays a message box asking the user whether to save the changes to the document,
      {
       if (!pDoc->IsModified())
        continue;        // ok to continue

       // get name/title of document
       // c by zcl for Doc path not scf file path,is LED Name, scf file path is changed to save in CScreen 成员变量
       CString PathName = pDoc->GetPathName();
       if (PathName.IsEmpty())
       {
        // get name based on caption
        PathName = GetDocDefaultPath(pDoc, theApp.GetProjectPath());
       }


       //if (!DoFileSave())
       pDoc->SetPathName(PathName);
       if (!pDoc->DoSave(PathName))
        return FALSE;       // don't continue
      }

     }
     return TRUE;
    }

  • 相关阅读:
    【转】winrar命令行详解
    【转】关于色彩空间sRGB和Adobe RGB...
    深入解读TPC-C指标
    解决因 RsFX devicer 而无法卸载 SQL Server 的问题
    LUHN算法
    信用卡卡号编排的含义
    关于第三方API调用的工具 WebApiClient.JIT 的使用记录
    ocelot.json模板
    C#进阶之事件与委托(Event&Delegate)
    C#进阶之面向对象(OOP)
  • 原文地址:https://www.cnblogs.com/carl2380/p/1919412.html
Copyright © 2011-2022 走看看