Login dark

title: VC6取当前目录
author: Love02xp
date: 2018-02-16 06:13:20
category: [编程代码]
tags: [代码,学习,VC6]
draft: false
cover:
preview:



1、    

    TCHAR szCurPath[MAX_PATH]; 
    memset(szCurPath, 0, MAX_PATH); 
    GetModuleFileName(NULL, szCurPath, sizeof(szCurPath)/sizeof(TCHAR));
<!--more-->

2、

    csSavePath=AfxGetApp()->m_pszHelpFilePath;
    csSavePath=csSavePath.Left(csSavePath.GetLength()-4);
    csSavePath = csSavePath + ".dat";

3、

    CString csSavePath;
    csSavePath=AfxGetApp()->m_pszHelpFilePath;
    csSavePath=csSavePath.Left(csSavePath.ReverseFind('\\')+1);