Article View: borland.public.cppbuilder.nativeapi
Article #17463Re: Another application's path question.
From: Rodolfo Frino - Stargate Softwar...
Date: Tue, 25 Mar 2003 15:56
Date: Tue, 25 Mar 2003 15:56
36 lines
2011 bytes
2011 bytes
I'm not sure if this is what you're looking for
String ComposeParentPath(String Drive, String Dir)
{
return Drive + ":\\" + Dir + "\\";
}
// Initially
String ParentPath1 = ComposeParentPath("C", "Visinet");
// User will change it
String ParentPath2 = ComposeParentPath("D", "nms");
// an example using the Parent Path
if (CopyFile((ParentPath2 + "file1.bmp").c_str(),
(ParentPath2 + "file2.bmp").c_str(), false))
{
ShowMessage("Copied");
}
else
{
ShowMessage("CopyFile failed");
}
Rodolfo
> Overall question. I now want to allow the user to be able to control the
> app's master directory. ie change c:\visinet to say d:\nms
>
> What is the standard/best way for the app to handle this? I have
implemented
> a mechanism using the info received from the recent postings but am not
very
> pleased with my implementation so I figured I would ask everyone else how
> they handle this. Sample code or links would be great.
Technical Details
Message-ID:
<3e808515@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3e807afd$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,fa57852cb200d57 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-03-25 09:09:00 PST From: "Rodolfo Frino - Stargate Software" <starcinema@eftel.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3e807afd$1@newsgroups.borland.com> Subject: Re: Another application's path question. Date: Wed, 26 Mar 2003 02:56:23 +1100 Lines: 39 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 NNTP-Posting-Host: 203.129.132.151 Message-ID: <3e808515@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1048610069 203.129.132.151 (25 Mar 2003 08:34:29 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail