BCB中的目录选择对话框的实现

有现成的函数。而且有2个不同的界面。其中一个是以前的Win31的界面。  
  AnsiString   Path;  
  if   (SelectDirectory("请选择目录","",Path))  
          ShowMessage(Path);  

出现的界面如下:
 
  下面是Win31的界面的:  
  AnsiString   Path   =   "C:\\";  
  if   (SelectDirectory(Path,TSelectDirOpts(),0))  
          ShowMessage(Path);

界面如下:

在使用前要加上包含头文件:

#include <FileCtrl.hpp>

但是一定要放到#include "unit1.h"的前面。

原文地址:https://www.cnblogs.com/maxma/p/1282560.html