SFML community forums

Help => General => Topic started by: somevan on March 28, 2024, 03:17:10 pm

Title: Is there a way to use the windows' default file/folder selector?
Post by: somevan on March 28, 2024, 03:17:10 pm
Im currently making a program, about editing json files. Is there a way to open the default windows file selector, and is it possible to make it open folders as well? I haven't found anything about this topic on the internet, so it would be really useful to know. I don't want to use the default WinAPI's choose file window, because it would only work in windows. Thanks in advance!
Title: Re: Is there a way to use the windows' default file/folder selector?
Post by: eXpl0it3r on March 28, 2024, 04:17:51 pm
No, SFML doesn't offer such a functionality, but there are various libraries that have implemented this in some way or another.

https://github.com/mlabbe/nativefiledialog
https://sourceforge.net/projects/tinyfiledialogs/
Title: Re: Is there a way to use the windows' default file/folder selector?
Post by: kojack on March 28, 2024, 06:15:06 pm
I use Portable File Dialogs: https://github.com/samhocevar/portable-file-dialogs
It's a single header only library that supports windows, mac and linux.
It can do file open/save and folder selection dialogs, plus message boxes and notifications.