prog_st(st):
  My e-mail is [email protected] you !

解决方案 »

  1.   

    重载CFileDialog类.codeguru可能有这种类.
    或者程序员大本营.
      

  2.   

    prog_st(st),我也要一个!谢谢!
    [email protected]
      

  3.   

    CFileDialog 或者自己编个都不难
      

  4.   

    /* Works only if we're Windows 95 capable */
    if (afxData.bWin4)
    {
        LPMALLOC pMalloc;
        /* Gets the Shell's default allocator */
        if (::SHGetMalloc(&pMalloc) == NOERROR)
        {
            BROWSEINFO bi;
            char pszBuffer[MAX_PATH];
            LPITEMIDLIST pidl;
            // Get help on BROWSEINFO struct - it's got all the bit settings.
            bi.hwndOwner = GetSafeHwnd();
            bi.pidlRoot = NULL;
            bi.pszDisplayName = pszBuffer;
            bi.lpszTitle = _T("Select a Starting Directory");
            bi.ulFlags = BIF_RETURNFSANCESTORS | BIF_RETURNONLYFSDIRS;
            bi.lpfn = NULL;
            bi.lParam = 0;
            // This next call issues the dialog box.
            if ((pidl = ::SHBrowseForFolder(&bi)) != NULL)
            {
                if (::SHGetPathFromIDList(pidl, pszBuffer))
                { 
                // At this point pszBuffer contains the selected path */.
                    DoingSomethingUseful(pszBuffer);
                }
                // Free the PIDL allocated by SHBrowseForFolder.
                pMalloc->Free(pidl);
            }
            // Release the shell's allocator.
            pMalloc->Release();
        }
    } Note   This code will work on Windows 95 or higher only—it's part of the shell.