void WriteLog(CString Msg)
{
 CTime tm =CTime::GetCurrentTime();
 CString str = tm.Format("%Y-%m-%d-%H-%M-%S");
 CString sPage = str + "     "+Msg+"r"+"n";
 CFile logfile (_T("C:\RunLog.log"), CFile::modeNoTruncate|CFile::modeReadWrite|CFile::modeCreate);
 logfile.SeekToEnd();
 logfile.Write(sPage,sPage.GetLength());
 logfile.Flush();
 logfile.Close();
}

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
  • 2021-05-29
  • 2021-10-08
  • 2021-09-16
猜你喜欢
  • 2021-09-04
  • 2021-12-21
  • 2022-12-23
  • 2022-12-23
  • 2021-10-12
  • 2022-12-23
  • 2021-05-13
相关资源
相似解决方案