Win32: TWin32WSSelectDirectoryDialog: hide "create dir" button if not ofCreatePrompt in Options. Patch by Alexey Torgashin. Issue #0029724.

git-svn-id: trunk@51746 -
This commit is contained in:
bart 2016-02-28 16:57:17 +00:00
parent f6cbb2bd25
commit 19a27c5796

View File

@ -1190,8 +1190,11 @@ begin
Title := UTF8ToUTF16(ACommonDialog.Title);
lpszTitle := PWideChar(Title);
ulFlags := BIF_RETURNONLYFSDIRS;
if not (ofCreatePrompt in Options) then
ulFlags := ulFlags + BIF_NONEWFOLDERBUTTON;
if not (ofOldStyleDialog in Options) then
ulFlags := ulFlags + BIF_USENEWUI;
// better than flag BIF_USENEWUI, to hide editbox, it's not handy
ulFlags := ulFlags + BIF_NEWDIALOGSTYLE;
lpfn := @BrowseForFolderCallback;
// this value will be passed to callback proc as lpData
lParam := Windows.LParam(PWideChar(InitialDirW));