ObjectARX_符號表---->線型

class CLinetypeParam
 { 
public: 
CLinetypeParam(); 
CLinetypeParam(CString v_strName, CString v_strView);
 virtual ~CLinetypeParam(); 
public: 
CString m_strName; //線型名 
CString m_strView; //線型描述
 }; 

typedef CArray AryLinetype; 
BOOL CBaseInf:ReadLineTypeFile(AryLinetype &v_Param, CString v_strPath)
 { 
char szPath[MAX_PATH];
 if (ads_findfile(v_strPath,szPath) != RTNORM)
 { 
ads_printf("Could not find file %s./n", v_strPath); 
return FALSE;
 } 

CLinetypeParam TempParam; 
TempParam.m_strName = _T("CONTINUOUS"); 
TempParam.m_strView = _T("_______________________________________"); //
v_Param.Add(CLinetypeParam("CONTINUOUS", // "_______________________________________")); 
v_Param.Add(TempParam); 
CStdioFile DateFile; 
CFileException e; 
CString strTemp = _T(""); 
if( !DateFile.Open(szPath, CFile::modeRead, &e ) ) 
{ 
ads_printf("Could not open file %s./n", v_strPath); 
return FALSE;
 } 

while(DateFile.ReadString(strTemp)) 
{ 
int nSt = strTemp.Find('*'); 
int nMi = strTemp.Find(','); 
if(nSt != -1 && nSt != -1 && nSt < nMi) 
{ 
CLinetypeParam TempParam; 
TempParam.m_strName = strTemp.Mid(nSt+1,nMi-nSt-1); 
TempParam.m_strView = strTemp.Mid(nMi+1); 
v_Param.Add(TempParam); 
}
 } 
DateFile.Close(); 
return TRUE;
 }

未完待續code

相關文章
相關標籤/搜索