BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to Use TOpenDialog to Open a Directory

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage)
View previous topic :: View next topic  
Author Message
nicolasr
Guest





PostPosted: Tue Dec 23, 2003 1:43 am    Post subject: Re: How to Use TOpenDialog to Open a Directory Reply with quote



Hi,
as far as I know the standard open dialog doesn't support this.
The usual way to go is use the VCL SelectDirectory() function
which brings up the Shells BrowseForFolder dialog.

hth,
Nick

"Bruno Felipe" <brunofelipe (AT) brturbo (DOT) com.br> schrieb im Newsbeitrag
news:3fe7921f$1 (AT) newsgroups (DOT) borland.com...
Quote:
Hi All,
I'm working on an app that the user will choose a diretory to store the
data
generated by the app.
How can i use a OpenDialog to select a directory ?
Is this the way ?

Thanks !

Bruno.





Back to top
Bruno Felipe
Guest





PostPosted: Tue Dec 23, 2003 1:54 am    Post subject: How to Use TOpenDialog to Open a Directory Reply with quote



Hi All,
I'm working on an app that the user will choose a diretory to store the data
generated by the app.
How can i use a OpenDialog to select a directory ?
Is this the way ?

Thanks !

Bruno.


Back to top
Seong Hun Jeong
Guest





PostPosted: Tue Dec 23, 2003 2:01 am    Post subject: Re: Use AnsiString::LastDelimiter() function...ex) OpenDialo Reply with quote



Sample code....

if(OpenDialog1->Execute())
{
AnsiString FilePath =
OpenDialog1->FileName.SubString(1,OpenDialog1->FileName.LastDelimiter("\"))
;

//Use FilePath
}



"Bruno Felipe" <brunofelipe (AT) brturbo (DOT) com.br> wrote

Quote:
Hi All,
I'm working on an app that the user will choose a diretory to store the
data
generated by the app.
How can i use a OpenDialog to select a directory ?
Is this the way ?

Thanks !

Bruno.





Back to top
Sage Honor(Jeong Seong-hu
Guest





PostPosted: Tue Dec 23, 2003 3:18 am    Post subject: Re: Use ExtractFilePath() Function Reply with quote

hi. i am Seong hun Jeong

I find API function...

ExtractFilePath(OpenDialog1->FileName));

p.s:
ExtractFileDrive();
ExtractFileName();
ExtractFileExt();


"Bruno Felipe" <brunofelipe (AT) brturbo (DOT) com.br> wrote

Quote:
Hi All,
I'm working on an app that the user will choose a diretory to store the
data
generated by the app.
How can i use a OpenDialog to select a directory ?
Is this the way ?

Thanks !

Bruno.





Back to top
Bruno Felipe
Guest





PostPosted: Tue Dec 23, 2003 3:46 am    Post subject: Re: How to Use TOpenDialog to Open a Directory Reply with quote


Thanks for the help !
, and Merry Christmas!


"Bruno Felipe" <brunofelipe (AT) brturbo (DOT) com.br> wrote

Quote:
Hi All,
I'm working on an app that the user will choose a diretory to store the
data
generated by the app.
How can i use a OpenDialog to select a directory ?
Is this the way ?

Thanks !

Bruno.





Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Tue Dec 23, 2003 7:13 pm    Post subject: Re: Use AnsiString::LastDelimiter() function...ex) OpenDialo Reply with quote

"Seong Hun Jeong" <sage5nor (AT) chol (DOT) com> wrote

Quote:
Sample code....

That requires the user to pick an actual file first, otherwise Execute()
will not return in the first place. That is not the same thing that Bruno
is asking for.

Quote:
AnsiString FilePath =

OpenDialog1->FileName.SubString(1,OpenDialog1->FileName.LastDelimiter("\"))


I guess you haven't seen the ExtractFilePath() function before:

AnsiString FilePath = ExtractFilePath(OpenDialog1->FileName);


Gambit



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.