char path[MAX_PATH]; BROWSEINFO bi;//保存用户选择的目录信息
bi.hwndOwner = NULL;
bi.pidlRoot = NULL;
bi.pszDisplayName = NULL;
bi.lpszTitle = NULL;
bi.ulFlags = NULL;
bi.lpfn = NULL;
bi.lParam = 0;
bi.iImage = 0;
SHGetPathFromIDList(SHBrowseForFolder(&bi),(LPWSTR)path);
bi.hwndOwner = NULL;
bi.pidlRoot = NULL;
bi.pszDisplayName = NULL;
bi.lpszTitle = NULL;
bi.ulFlags = NULL;
bi.lpfn = NULL;
bi.lParam = 0;
bi.iImage = 0;
SHGetPathFromIDList(SHBrowseForFolder(&bi),(LPWSTR)path);