Update PathRequester() to use IFileDialog on Windows
Posted: Fri Nov 03, 2023 12:15 am
Hello!
I noticed that as of PureBasic 6.03 PathRequester() still uses the old "Open Folder" dialog, even though there is a new and much more user-friendly dialog available since Windows Vista. This new dialog looks like the dialog used by OpenFileRequester() and SaveFileRequester().
As far as I know, this new dialog is available through the IFileDialog interface, but I couldn't try it out myself because I don't know how to use COM in PureBasic.
If possible, please change PathRequester() to use the new dialog on Windows!
Apparently it is necessary to call IFileDialog::SetOptions() and add FOS_PICKFOLDERS to the options in order to switch IFileDialog into folder selection mode. But again, I haven't tried this myself.
Some (hopefully helpful) documentation on this topic:
https://learn.microsoft.com/en-us/windo ... ile-dialog
https://learn.microsoft.com/en-us/windo ... filedialog
https://learn.microsoft.com/en-us/windo ... setoptions
https://learn.microsoft.com/en-us/windo ... logoptions
Thanks,
Nils
I noticed that as of PureBasic 6.03 PathRequester() still uses the old "Open Folder" dialog, even though there is a new and much more user-friendly dialog available since Windows Vista. This new dialog looks like the dialog used by OpenFileRequester() and SaveFileRequester().
As far as I know, this new dialog is available through the IFileDialog interface, but I couldn't try it out myself because I don't know how to use COM in PureBasic.
If possible, please change PathRequester() to use the new dialog on Windows!
Apparently it is necessary to call IFileDialog::SetOptions() and add FOS_PICKFOLDERS to the options in order to switch IFileDialog into folder selection mode. But again, I haven't tried this myself.
Some (hopefully helpful) documentation on this topic:
https://learn.microsoft.com/en-us/windo ... ile-dialog
https://learn.microsoft.com/en-us/windo ... filedialog
https://learn.microsoft.com/en-us/windo ... setoptions
https://learn.microsoft.com/en-us/windo ... logoptions
Thanks,
Nils