summaryrefslogtreecommitdiff
path: root/ui/dir_name.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:21:59 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:21:59 +0200
commitd4af25c52a28b93484ffb55e0a8027bc4ce7856f (patch)
tree853d57468d6b370711e7a5dd2c3dc7d5bac81b10 /ui/dir_name.cpp
parent5.8 (diff)
downloadFreeFileSync-d4af25c52a28b93484ffb55e0a8027bc4ce7856f.tar.gz
FreeFileSync-d4af25c52a28b93484ffb55e0a8027bc4ce7856f.tar.bz2
FreeFileSync-d4af25c52a28b93484ffb55e0a8027bc4ce7856f.zip
5.9
Diffstat (limited to 'ui/dir_name.cpp')
-rw-r--r--ui/dir_name.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/ui/dir_name.cpp b/ui/dir_name.cpp
index 406903e6..7d4f7a31 100644
--- a/ui/dir_name.cpp
+++ b/ui/dir_name.cpp
@@ -185,14 +185,19 @@ void DirectoryName<NameControl>::OnSelectDir(wxCommandEvent& event)
const DllFun<FunType_freeString> freeString (getDllName(), funName_freeString);
if (showFolderPicker && freeString)
{
- const wchar_t* selectedFolder = nullptr;
- const wchar_t* errorMsg = nullptr;
+ wchar_t* selectedFolder = nullptr;
+ wchar_t* errorMsg = nullptr;
bool cancelled = false;
ZEN_ON_SCOPE_EXIT(freeString(selectedFolder));
ZEN_ON_SCOPE_EXIT(freeString(errorMsg));
+ const GuidProxy guid = { '\x0', '\x4a', '\xf9', '\x31', '\xb4', '\x92', '\x40', '\xa0',
+ '\x8d', '\xc2', '\xc', '\xa5', '\xef', '\x59', '\x6e', '\x3b'
+ }; //some random GUID => have Windows save IFileDialog state separately from other file/dir pickers!
+
showFolderPicker(static_cast<HWND>(selectButton_.GetHWND()), //in; ==HWND
defaultDirname.empty() ? nullptr : defaultDirname.c_str(), //in, optional!
+ &guid,
selectedFolder, //out: call freeString() after use!
cancelled, //out
errorMsg); //out, optional: call freeString() after use!
bgstack15