还有SHGetPathFromIDList<br>程序示例如下:<br>//自定义函数,前提:必须uses ShlObj;<br>function ShellBrowserDialog(owner:HWND; const TitleName:string; StyleFlag:cardinal; var ResultPath:string):bool;<br>var<br> lpItemID : PItemIDList; <br> BrowseInfo : TBrowseInfo; <br> DisplayName : array[0..MAX_PATH] of char; <br> TempPath : array[0..MAX_PATH] of char; <br>begin<br> result:=false; <br> FillChar(BrowseInfo, sizeof(TBrowseInfo), #0); <br> BrowseInfo.hwndOwner := owner; <br> BrowseInfo.pszDisplayName := @DisplayName; <br> BrowseInfo.lpszTitle := PChar(TitleName); <br> BrowseInfo.ulFlags := StyleFlag; <br> lpItemID := SHBrowseForFolder(BrowseInfo); <br> if lpItemId &lt;&gt; nil then <br> begin<br> result:=true; <br> SHGetPathFromIDList(lpItemID, TempPath); <br> ResultPath:=TempPath; <br> GlobalFreePtr(lpItemID); <br> end;<br>end;<br>