📄 tools.cpp
字号:
// Tools.cpp: implementation of the CTools class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "Tools.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CTools::CTools()
{
}
CTools::~CTools()
{
}
/*---------------------------------------------------------------------------------
功能:获得文件全路径
说明:
返回:
---------------------------------------------------------------------------------*/
int CTools::GetFullFileName( char* szFileName )
{
int count,i,pos;
char path[1024], file_name[1024];
strcpy( file_name, szFileName );
GetModuleFileName( NULL, path, 1024 );
count = strlen( path );
pos = -1;
for( i = count - 1; i > 0; i-- )
{
if( path[i] == '\\' )
{
pos = i;
break;
}
}
if( pos != -1 )
{
path[ pos + 1 ] = 0;
strcat( path, file_name );
strcpy( szFileName, path );
return 0;
}
return 1;
}
/*---------------------------------------------------------------------------------
功能:设置文件路径(只需设置一个文件名称就可以了)
说明:
返回:
---------------------------------------------------------------------------------*/
int CTools::SetIniFileName(char* szFileName )
{
strcpy( m_file_name, szFileName );
GetFullFileName( m_file_name );
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -