📄 commonfunction.cpp
字号:
// CommonFunction.cpp: implementation of the CCommonFunction class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "CommonFunction.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
CString CCommonFunction::GetFilePath(LPCTSTR lpszFilePath)
{
TCHAR szDir[_MAX_DIR];
TCHAR szDrive[_MAX_DRIVE];
_tsplitpath(lpszFilePath, szDrive, szDir, NULL, NULL);
return CString(szDrive) + CString(szDir);
}
CString CCommonFunction::GetFileName(LPCTSTR lpszFilePath)
{
TCHAR szExt[_MAX_EXT];
TCHAR szName[_MAX_FNAME];
_tsplitpath(lpszFilePath, NULL, NULL, szName, szExt);
return CString(szName);
}
CString CCommonFunction::GetFileExtName(LPCTSTR lpszFilePath)
{
TCHAR szExt[_MAX_EXT];
TCHAR szName[_MAX_FNAME];
_tsplitpath(lpszFilePath, NULL, NULL, szName, szExt);
return CString(szExt);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -