📄 mylog.cpp
字号:
// MyLog.cpp: implementation of the CMyLog class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "PosManager.h"
#include "MyLog.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CMyLog::CMyLog()
{
m_szFileName="";
}
CMyLog::~CMyLog()
{
}
bool CMyLog::Open(CString szPath, CString szName)
{
m_szFileName=szPath+"\\"+szName;
m_file.Open(m_szFileName, CFile::modeCreate |CFile::modeNoTruncate| CFile::modeWrite);
return true;
}
void CMyLog::Close()
{
if(m_szFileName!="")m_file.Close();
}
void CMyLog::WriteLog(CString str)
{
str+="\n\r";
m_file.SeekToEnd();
m_file.WriteString(str);
}
void CMyLog::ReadLog()
{
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -