Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Stupid newb + file_select_ex = stupid newb post about file_select_ex

This thread is locked; no one can reply to it. rss feed Print
Stupid newb + file_select_ex = stupid newb post about file_select_ex
Ampersand
Member #5,622
March 2005

Hey guys;

Trying to write up a quick little program here. I've done ok so far, but I've never used the GUI componants. Yes, I've heard that no one likes the Allegro GUI. But I only need one thing from it: The File Dialog box. I figure it's simpler to use an ugly box that's already made than to make one of my own.

Problem is, I haven't a clue how to use it. Can anyone throw me a quick example of getting the GUI box onscreen? I checked the GUI Clinic tutorials but they didn't have anything about it listed there.

Sidenote: If I do need a GUI later, what's everyone's recommendation here?

Thanks!

kdevil
Member #1,075
March 2001
avatar

Quick little "select a picture to load" dialog using file_select_ex:

char path[100] = "";

BITMAP *temp;

if (file_select_ex("Select a picture", path, "BMP;LBM;PCX;TGA", sizeof(path), 600, 460) != 0)
{
    temp = load_bitmap(path, NULL);
}

-----
"I am the Black Mage! I casts the spells that makes the peoples fall down!"

Michael Faerber
Member #4,800
July 2004
avatar

Quote:

If I do need a GUI later, what's everyone's recommendation here?

MASkinG is a good one.
For GUIs look here.

--
"The basic of informatics is Microsoft Office." - An informatics teacher in our school
"Do you know Linux?" "Linux? Isn't that something for visually impaired people?"

Go to: