Page 1 of 1

Update PathRequester() to use IFileDialog on Windows

Posted: Fri Nov 03, 2023 12:15 am
by NilsH
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

Re: Update PathRequester() to use IFileDialog on Windows

Posted: Sat Nov 04, 2023 4:27 pm
by Quin
+1

Re: Update PathRequester() to use IFileDialog on Windows

Posted: Tue Nov 07, 2023 3:42 pm
by Axolotl
maybe you should look at this.
Select folder dialog

Re: Update PathRequester() to use IFileDialog on Windows

Posted: Sun Nov 12, 2023 10:18 pm
by NilsH
Axolotl wrote: Tue Nov 07, 2023 3:42 pm maybe you should look at this.
Select folder dialog
Thanks! I will check this out.

However, I still think that PathRequester() should be updated, given that the new dialog was introduced 17 years ago.