- Online Community Forums » Programming Questions » how to incorporate FileEditor in an appln.

This thread is locked; no one can reply to it. rss feed Print
how to incorporate FileEditor in an appln.
raja peter
Member #7,835
October 2006


I don't know windows programming.

I want to use FileEditor utility for windows that is available in allegro examples in my game. But I haven't developed my game as a windows application. I just want when a button is pressed by mouse I want the FileEditor(File dialog) to be opened and just want to select a file name(with path). NO save or Edit options are required.

In my game there's a main fn. Also in fileeditor program there is a function called WinMain.

Is it possible to use that code for my game.




Member #7,733
September 2006


Do you mean Allegro's built-in/pre-built file_select_ex or were you asking for something different?

Using file_select_ex, you wouldn't need to code much of anything else to get the File dialog working. However, if you wanted to make a custom file loading routine, you may need to write it yourself.

I usually found it easiest to assume that the user knew the filename (and file path) of the file they wished to open, then draw my "which file do you wish to open" myself (it included drawing a filled-color rectangle, output text such as "Filename: ", and a function to accept keyboard input), and open the file that way.

Go to: