⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 folder.cpp

📁 用VC编写的可以将VC.NET的文档转换成VC6.0的文档的程序
💻 CPP
字号:
// Folder.cpp: implementation of the CFolder class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Folder.h"
#include <windows.h>
#include <shlobj.h>
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CFolder::CFolder()
{

}

CFolder::~CFolder()
{

}

std::string CFolder::GetFolder()
{
	BROWSEINFO BrowseInfo ;
	std::string  strret;

	memset(&BrowseInfo,0,sizeof(BrowseInfo));
    BrowseInfo.lpszTitle = "Please choose a directory";
	BrowseInfo.ulFlags   = BIF_RETURNONLYFSDIRS ;  
    LPITEMIDLIST lpItemIDList = SHBrowseForFolder ( &BrowseInfo );
    if ( lpItemIDList != 0 )
    {
        char path[MAX_PATH];
        if (SHGetPathFromIDList ( lpItemIDList, path ) )
        {
			////////////////////
			strret = path; 
			
			////////////////////
        }
        IMalloc * iMalloc = 0;
        if (  SHGetMalloc ( &iMalloc ) )
        {
            iMalloc->Free ( lpItemIDList );
            iMalloc->Release ( );
        }
    }	
	return strret; 
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -