To deal with files in the same file folder with .exe uder UNICODE of VC08

CString sPath; int nPos; GetModuleFileName(NULL,sPath.GetBufferSetLength (MAX_PATH+1),MAX_PATH); sPath.ReleaseBuffer (); nPos=sPath.ReverseFind(_T('//')); //可不是像下面的"" sPath=sPath.Left (nPos); CString lpszFile = sPath + _T("//test.txt"); CString lpszFile1 = sPath + _T("//test1.txt"); 

 

然后,操作lpszFile和lpszFile1就行了。

你可能感兴趣的:(To deal with files in the same file folder with .exe uder UNICODE of VC08)