📄 utilityclass.cpp
字号:
// UtilityClass.cpp: implementation of the CUtilityClass class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "UtilityClass.h"
#include "..\ToolSoftForPrint.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CUtilityClass::CUtilityClass()
{
//m_frmChild->m_wndOutPutInfBar.m_wndInf.SetWindowText("fsd");
}
CUtilityClass::~CUtilityClass()
{
}
BOOL CUtilityClass::drawPrintLine(CString strFilePath,CToolSoftForPrintView * pView,CEdit *pEdit)
{
return TRUE;
}
BOOL CUtilityClass::writeRandomDatoToFileLine(CString strFilePath)
{
CFile fileTmp;
fileTmp.Open(strFilePath,CFile::modeCreate | CFile::modeWrite);
fileTmp.Write("bbb",3);
fileTmp.Close();
return TRUE;
}
CString CUtilityClass::getAppPath()
{
char cExeFilePath[MAX_PATH];
GetModuleFileName(NULL, cExeFilePath, sizeof(cExeFilePath));
CString strPath(cExeFilePath);
int iPos = strPath.ReverseFind('\\');
strPath=strPath.Left(iPos);
return strPath;
}
int CUtilityClass::getIniValueInt(CString strSection,CString strKey,int iDefault,CString strFilePath )
{
return GetPrivateProfileInt(strSection,strKey,iDefault,strFilePath);
}
CString CUtilityClass::getIniValueString(CString strSection,CString strKey,CString strDefault,CString strFilePath )
{
char cTmp[50];
memset(cTmp,0,50);
GetPrivateProfileString(strSection,strKey,strDefault,cTmp,50,strFilePath);
return CString(cTmp);
}
BOOL CUtilityClass::WriteIniValue(CString strSection,CString strKey,CString strValue,CString strFilePath )
{
return WritePrivateProfileString(strSection,strKey,strValue,strFilePath);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -