From: "Pavlos" Newsgroups: comp.os.msdos.djgpp Subject: Re: Getting a directory with Allegro file_select Date: Wed, 4 Aug 1999 03:47:06 +0300 Organization: An OTEnet S.A. customer Lines: 39 Message-ID: <7o82ja$evu$1@newssrv.otenet.gr> References: <8D53104ECD0CD211AF4000A0C9D60AE301545DBD AT probe-2 DOT acclaim-euro DOT net> NNTP-Posting-Host: dram-a02.otenet.gr X-Trace: newssrv.otenet.gr 933727658 15358 195.167.113.225 (4 Aug 1999 00:47:38 GMT) X-Complaints-To: abuse AT otenet DOT gr NNTP-Posting-Date: 4 Aug 1999 00:47:38 GMT X-Newsreader: Microsoft Outlook Express 4.72.3110.1 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Shawn Hargreaves wrote in message <8D53104ECD0CD211AF4000A0C9D60AE301545DBD AT probe-2 DOT acclaim-euro DOT net>... >B O'Donnell writes: >> I want to be able to use the file selector to pick a working directory; >> is this possible? > >No. You'll have to make your own modified version if you want to do this. >As written, selecting a directory from the listbox is interpreted as >wanting to look inside that directory, and closing the dialog without >selecting anything is interpreted as cancelling it, so you can't use it >to choose the working directory unless you change these behaviours. > > > Shawn Hargreaves. Actually, it can be done. Run this little program, find the directory you want, click on it once and click on OK. #include int main(void) { char path[1000]; int i; allegro_init(); install_keyboard(); install_mouse(); install_timer(); set_gfx_mode(GFX_SAFE, 320, 200, 0, 0); i=file_select("Hello", path, "/d-ar"); allegro_exit(); printf("%i, %s\n", i, path); return(0); } Pavlos