一个MFC风格的BrowseForFolder 封装类

来源:互联网 发布:websoc是什么软件 编辑:程序博客网 时间:2024/05/23 12:25

 原文链接: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

if (IDOK == dlg.DoModal())
{
    CString s 
= dlg.GetPath();
    
// Do something with `s' 


YABFFW.h

YABFFW.cpp

原创粉丝点击