https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ca62121b4dd9d7fb763d4…
commit ca62121b4dd9d7fb763d4634b89b1ed95ce02106
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Thu Jul 20 08:46:51 2023 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Thu Jul 20 08:46:51 2023 +0900
[APPWIZ] "Create Shortcut" wizard: Only filesystem items (#5455)
- Add (BIF_RETURNONLYFSDIRS | BIF_NEWDIALOGSTYLE | BIF_SHAREABLE) flags.
- Consider the failure of SHGetPathFromIDListW.
CORE-5866
---
dll/cpl/appwiz/createlink.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/dll/cpl/appwiz/createlink.c b/dll/cpl/appwiz/createlink.c
index 5646ce29477..25de942ed2b 100644
--- a/dll/cpl/appwiz/createlink.c
+++ b/dll/cpl/appwiz/createlink.c
@@ -269,7 +269,8 @@ WelcomeDlgProc(HWND hwndDlg,
brws.hwndOwner = hwndDlg;
brws.pidlRoot = NULL;
brws.pszDisplayName = szPath;
- brws.ulFlags = BIF_BROWSEINCLUDEFILES;
+ brws.ulFlags = BIF_BROWSEINCLUDEFILES | BIF_RETURNONLYFSDIRS |
+ BIF_NEWDIALOGSTYLE | BIF_SHAREABLE;
brws.lpfn = NULL;
pidllist = SHBrowseForFolderW(&brws);
if (!pidllist)
@@ -281,6 +282,11 @@ WelcomeDlgProc(HWND hwndDlg,
SendDlgItemMessageW(hwndDlg, IDC_SHORTCUT_LOCATION, WM_SETFOCUS,
0, 0);
SendDlgItemMessageW(hwndDlg, IDC_SHORTCUT_LOCATION, EM_SETSEL, 0,
-1);
}
+ else
+ {
+ SetDlgItemTextW(hwndDlg, IDC_SHORTCUT_LOCATION, NULL);
+ }
+
/* Free memory, if possible */
CoTaskMemFree(pidllist);
break;