文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > reversefind

reversefind

  • VC从文件全路径中获取文件名和扩展名方法(CString

    ...FileTitleFromFileName(CString FileName,CString&ExtendName) //获取文件名和扩展名{int Where;Where=FileName.ReverseFind('\\');if(Where==-1){Where=FileName.ReverseFind('/');}CString FileTitle=FileName.Right(FileName.GetL...

  • MFC得到exe绝对路径

    ...PATH);GetModuleFileName(NULL,exepath,MAX_PATH); tmpdir=exepath; strdir=tmpdir.Left(tmpdir.ReverseFind('\\')); return strdir; }另外两种:方法一:[code] //得到帮助文件的路径CString strFullName = AfxGetApp()->m_psz...

  • VC 开机自动启动程序代码

    ...ame(NULL,sPath.GetBufferSetLength(MAX_PATH+1),MAX_PATH);sPath.ReleaseBuffer();int nPos;nPos=sPath.ReverseFind('\\');sPath=sPath.Left(nPos);CString lpszFile=sPath+"\\getip.exe";//这里加上你要查找的执行文件名称 ...

  • CFileDialog的用法简介

    ... > 0 ) {CString str = htmlStrings.GetHead();GetDlgItem(IDC_PATH)-> SetWindowText(str.Left(str.ReverseFind( '\\ ')+1));}} delete [] dlg.m_ofn.lpstrFile;}偶Copy自己的项目代码给楼主作参考,记得偶得好噢~~~~~~~ void CGeoAnView::OnL...

  • ADO数据库编程

    ...Name, MAX_PATH);// 获取当前进程已加载模块的文件的完整路径 CString strPath = szPathName; int nPos; nPos = strPath.ReverseFind (_T('\\'));//获取strPath中最后的\\的位置 strPath = strPath.Left(nPos);//取得路径 strPath+= _T("\\..\\stud...

  • 在VC++ 6.0中使用 HTML Help

    ...TH), MAX_PATH); //注:使用该API函数得到的是程序文件完整路径文件名,去掉文件名后才是路径。appPath.ReleaseBuffer();int n = appPath.ReverseFind('\\');CString helpFile;helpFile = appPath.Left(n);TCHAR c = helpFile.GetAt(n - 1);if(c == '\\') hel...

  • Cstring类说明

    ...str2")); }else{ MessageBox(_T("str1 不等于 str2")); } ③、字符串的查找: Find、ReverseFind、FindOneOf 三个函数可以实现字符串的查找操作 Find 从指定位置开始查找指定的字符或者字符串,返回其位置,找不到返回 -1; 举例: CString str(_T(&qu...

  • 常用函数

    ...tFileName(sPath, 2); // 取得文件的路径 sPath = sPath.Left(sPath.GetLength()-1); //去掉最后的'\' nFind = sPath.ReverseFind('\\'); // 找到前一个\号 sParentDir = sPath.Right(sPath.GetLength() - nFind - 1); if(sParentDir.IsEmpty(...

  • VC++, MFC中实现选择文件夹,选择文件对话框,确定当前工作目录

    ...L, strAppName.GetBuffer(_MAX_PATH), _MAX_PATH); strAppName.ReleaseBuffer(); int nPos = strAppName.ReverseFind('\\'); strAppName = strAppName.Left(nPos + 1); // AfxMessageBox(strAppName); // 文件扩展名过滤器 ...

    最近文档搜索:

      站点地图 | 文档上传 | 侵权投诉 | 手机版
      本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
      文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email