Open GitSparTV opened 5 years ago
@capr winapi.treeview is broken now as you commented in file, so there's no alternative to make a folder selector by scratch.
Note that winapi doesn't use the COM interface to show the file dialog box but standard win32 API. There probably is an option to select a folder with that API too but I haven't checked.
Oops, no there isn't. MSDN says: To display a dialog box that allows the user to select a directory instead of a file, call the SHBrowseForFolder
function.
@capr I've found this when was searching this question https://stackoverflow.com/questions/8269696/how-to-use-ifiledialog-with-fos-pickfolder-while-still-displaying-file-names-in
He use FOS_PICKFOLDERS
Hello. According to Microsoft manuals, the IFileDialog can have a option
FOS_PICKFOLDERS
to enable folder selection instead of file.Can that be accessed by winapi and be a new feature? Thanks
https://docs.microsoft.com/en-us/windows/desktop/api/shobjidl_core/nf-shobjidl_core-ifiledialog-setoptions https://docs.microsoft.com/ru-ru/windows/desktop/api/shobjidl_core/ne-shobjidl_core-_fileopendialogoptions