From d4af25c52a28b93484ffb55e0a8027bc4ce7856f Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 17:21:59 +0200 Subject: 5.9 --- ui/dir_name.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'ui/dir_name.cpp') 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::OnSelectDir(wxCommandEvent& event) const DllFun 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(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! -- cgit