天天看点

一个MFC风格的BrowseForFolder 封装类

 原文链接:CYABFFW: Yet Another BrowseForFolder Wrapper

      以良好的MFC风格将Shell API函数SHBrowseForFolder()封装为一个CWnd子类。

使用示例1:

 CYABFFW dlg();

if (IDOK == dlg.DoModal())

{

    CString s = dlg.GetPath();

    // Do something with `s' 

使用示例2:

复制代码

CYABFFW dlg(_T("Please select a directory"), // Hint to user

            BIF_USE_NEWUI,                   // Flags for the dlg

            this,                            // Parent window

            CSIDL_DRIVES);                   // Root of search

YABFFW.h

 YABFFW.cpp

本文转自Phinecos(洞庭散人)博客园博客,原文链接:http://www.cnblogs.com/phinecos/archive/2008/06/20/1226436.html,如需转载请自行联系原作者