rainbowzc

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: :: :: 管理 ::
CString   strPath;  
  CString   oldpath;  
  ::GetModuleFileName(NULL,strPath.GetBufferSetLength(MAX_PATH+1),  
  MAX_PATH);  
  strPath.ReleaseBuffer();  
  oldpath=strPath;  
  int   nPos=strPath.ReverseFind('//');  
  strPath=strPath.Left(nPos);  
          CString   strFileName;//.Format("%s",strPath);  
  strFileName.Format("%s",oldpath);  
          strFileName   =   strFileName.Right(strFileName.GetLength()   -   nPos   -1);  
  AfxGetMainWnd()->SetDlgItemText(IDC_EDIT3,strPath);  
  AfxGetMainWnd()->SetDlgItemText(IDC_EDIT4,strFileName); 
posted on 2007-08-31 16:51  ct  阅读(204)  评论(0编辑  收藏  举报