globaldef.cpp

来自「一个通过USB->UART读取C8051F060的程序」· C++ 代码 · 共 31 行

CPP
31
字号
#include "StdAfx.h"
#include "GlobalDef.h"


/////////////////////////////////////////////////////////////////////
//
YAxisRange		g_sRange;
XAxisRange		g_sXRange;
AxisRange_Zoom  g_sYAxisRange_Zoom;
AxisRange_Zoom  g_sXAxisRange_Zoom;
GlobalArgInfo   g_sGlobalArgInfo;
char g_pstrPath[APPPATHLEN];
CString   g_strBattPath;
//////////////////////////////////////////////////////////////////////
//
void pltCurrentPath(char pstrPath[APPPATHLEN], int maxPathLen)
{
		if(::AfxIsValidAddress(pstrPath, maxPathLen))
		{
				::GetModuleFileName(::AfxGetInstanceHandle(), pstrPath, APPPATHLEN);
				
				CString   strPath(pstrPath), strLast;
				int  nIndex = strPath.ReverseFind('\\');
				strLast = strPath.Left(nIndex);
				strPath.Empty();
				//
				pstrPath = ::strcpy(pstrPath, (LPCTSTR)strLast);
		}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?