m_edtdisplay_called = (CEdit*)(AfxGetMainWnd()->GetDlgItem(IDC_DISPLAY_CALLED));
    std::ofstream logfile;


  AfxGetMainWnd()->UpdateData(TRUE);
  CString strDisplay;
  m_edtdisplay_called->GetWindowText(strDisplay);
  logfile.open("Log.txt", std::ios::app);
  char tmpbuf[128];
  _strdate(tmpbuf);  //retrieve the OS date
  logfile << "[" << tmpbuf << " ";
  strDisplay = strDisplay + "[" + tmpbuf + " ";
  _strtime(tmpbuf);  //retrieve the OS time
  logfile << tmpbuf << "]" << " AlarmStoreCallback::indexCleared() has been called! " << std::endl;
  strDisplay = strDisplay + tmpbuf + "]" + " AlarmStoreCallback::indexCleared() has been called! " + "\r\n";
  m_edtdisplay_called->SetWindowText(strDisplay);
  AfxGetMainWnd()->UpdateData(TRUE);  //display in the control
  logfile << std::flush;
  logfile.close();  
posted on 2007-03-08 10:20 活着就是折腾,所以当然要骠悍的折腾 阅读(489) 评论(0)  编辑 收藏 引用 所属分类: MFC

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理