[求助]有关导入TXT文件到INPUT里面的问题
我刚自己写的CODING..
CFileDialog l_SampleDlg(TRUE,NULL,NULL,OFN_OVERWRITEPROMPT,"Text Files (*.txt)|*.txt|Comma Separated Values(*.csv)|*.csv||");
int iRet = l_SampleDlg.DoModal();
CString l_strFileName;
CString strText;
l_strFileName = l_SampleDlg.GetPathName();
CFile cSplitFile ;
while(!cSplitFile.Open(l_strFileName,CFile::shareDenyWrite))//打开文件
continue ;
int nFileLen = cSplitFile.GetLength();
LPTSTR lpText = strText.GetBuffer(nFileLen+1) ;
m_Input = lpText;
UpdateData(FALSE);
if(iRet == IDOK)
MessageBox(l_strFileName);
else
MessageBox("No File Selected!");
但是M_INPUT还是读不到TXT文件里面的文字,为何呢?a