-1

Im trying to make (what I thought was a simple) extension for Game maker studio 2.

I am restricted to making a DLL app.

I am wondering is there any was to have a dll app open the file explorer have the user locate a file and then return said directory?

I fell like this is a sumb question but one I really need to know the answer too before slaving away coding for hours only to find its not possible.

Chris_livermore
  • 171
  • 1
  • 13

2 Answers2

1

You do not want to launch the explorer but to open a file dialog that allows the user to select a file.

Depending on the framework you use in your program the solutions may differ.

If you are using Qt framework you may use a QFileDialog for a platform independent mechanism.

If you are okay that it will only works on Windows then you may directly use the WinAPI functions GetOpenFileName or GetSaveFileName (that is a lot easier than the Common Item Dialog that is suggested as replacement on their documentation pages)

vlad_tepesch
  • 6,681
  • 1
  • 38
  • 80
0

On GameMaker terms, you want to use get_open_filename or get_open_filename_ext.

See Dialog Module (marketplace, github) for C++ implementation reference.

YellowAfterlife
  • 2,967
  • 1
  • 16
  • 24