summaryrefslogtreecommitdiff
path: root/plugins/Utils.pas/wrapdlgs.pas
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Utils.pas/wrapdlgs.pas')
-rw-r--r--plugins/Utils.pas/wrapdlgs.pas29
1 files changed, 15 insertions, 14 deletions
diff --git a/plugins/Utils.pas/wrapdlgs.pas b/plugins/Utils.pas/wrapdlgs.pas
index 21dcffd9e5..b1cb85dd52 100644
--- a/plugins/Utils.pas/wrapdlgs.pas
+++ b/plugins/Utils.pas/wrapdlgs.pas
@@ -58,19 +58,20 @@ function SHGetPathFromIDListW(pidl: PItemIDList; pszPath: PWideChar): bool; stdc
procedure CoTaskMemFree(pv: pointer); stdcall; external 'ole32.dll'
name 'CoTaskMemFree';
+// ShlObj unit constants
const
BIF_RETURNONLYFSDIRS = $0001; { For finding a folder to start document searching }
- BIF_DONTGOBELOWDOMAIN = $0002; { For starting the Find Computer }
- BIF_STATUSTEXT = $0004;
- BIF_RETURNFSANCESTORS = $0008;
- BIF_EDITBOX = $0010;
- BIF_VALIDATE = $0020; { insist on valid result (or CANCEL) }
+// BIF_DONTGOBELOWDOMAIN = $0002; { For starting the Find Computer }
+// BIF_STATUSTEXT = $0004;
+// BIF_RETURNFSANCESTORS = $0008;
+// BIF_EDITBOX = $0010;
+// BIF_VALIDATE = $0020; { insist on valid result (or CANCEL) }
BIF_NEWDIALOGSTYLE = $0040; { Use the new dialog layout with the ability to resize }
{ Caller needs to call OleInitialize() before using this API (c) JVCL }
- BIF_BROWSEFORCOMPUTER = $1000; { Browsing for Computers. }
- BIF_BROWSEFORPRINTER = $2000; { Browsing for Printers }
- BIF_BROWSEINCLUDEFILES = $4000; { Browsing for Everything }
-
+// BIF_BROWSEFORCOMPUTER = $1000; { Browsing for Computers. }
+// BIF_BROWSEFORPRINTER = $2000; { Browsing for Printers }
+// BIF_BROWSEINCLUDEFILES = $4000; { Browsing for Everything }
+{
BFFM_INITIALIZED = 1;
BFFM_SELCHANGED = 2;
@@ -78,7 +79,7 @@ const
BFFM_ENABLEOK = WM_USER + 101;
BFFM_SETSELECTION = WM_USER + 102;
BFFM_SETSELECTIONW = WM_USER + 103;
-
+}
function SelectDirectory(Caption:PAnsiChar;var Directory:PAnsiChar;Parent:HWND=0):Boolean;
var
BrowseInfo:TBrowseInfoA;
@@ -93,10 +94,10 @@ begin
BrowseInfo.lpszTitle :=Caption;
BrowseInfo.ulFlags :=BIF_RETURNONLYFSDIRS or BIF_NEWDIALOGSTYLE;
- ItemIDList:=ShBrowseForFolderA(BrowseInfo);
+ ItemIDList:=SHBrowseForFolderA(BrowseInfo);
if ItemIDList<>nil then
begin
- ShGetPathFromIDListA(ItemIDList,Buffer);
+ SHGetPathFromIDListA(ItemIDList,Buffer);
StrDup(Directory,Buffer);
CoTaskMemFree(ItemIDList);
result:=true;
@@ -117,10 +118,10 @@ begin
BrowseInfo.lpszTitle :=Caption;
BrowseInfo.ulFlags :=BIF_RETURNONLYFSDIRS or BIF_NEWDIALOGSTYLE;
- ItemIDList:=ShBrowseForFolderW(BrowseInfo);
+ ItemIDList:=SHBrowseForFolderW(BrowseInfo);
if ItemIDList<>nil then
begin
- ShGetPathFromIDListW(ItemIDList,Buffer);
+ SHGetPathFromIDListW(ItemIDList,Buffer);
StrDupW(Directory,Buffer);
CoTaskMemFree(ItemIDList);
result:=true;