🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #849

Re: OpenDialogBox and Inital Dir

#849
From: Asger Joergensen
Date: Fri, 07 Dec 2007 15:41
27 lines
1449 bytes
Hi Christophe
 
 Christophe MINETTI says:
> Hi,
> 
> I would like to tell an OpenDialogBox in which directory it must be
> opened. For this, I use InitialDir which works fine the first time but
> then if I change the InitalDir value with another path, it does not take
> it into account. Is there any way to overcome this ?

Do You mean TOpenDialog ?

This might help:

TOpenDialog *OpenDialog = new TOpenDialog(NULL);
OpenDialog->InitialDir = "ThePath";
if(OpenDialog->Execute())
{
	// do stuff
}
delete OpenDialog;

This way You have a new one every time.

Kind regards
Asger
Technical Details
Message-ID: <MPG.21c387f796b0a1ac989950@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <4759646C.A4CA4D26@ulb.ac.be>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,663e99632cbe46da
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Asger Joergensen <junk@Asger-P.dk>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: OpenDialogBox and Inital Dir
Date: Fri, 7 Dec 2007 16:41:07 +0100
Message-ID: <MPG.21c387f796b0a1ac989950@newsgroups.borland.com>
References: <4759646C.A4CA4D26@ulb.ac.be>
Organization: Asger-P
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
User-Agent: MicroPlanet-Gravity/2.70.2067
NNTP-Posting-Host: 83.73.201.25
X-Trace: newsgroups.borland.com 1197042064 83.73.201.25 (7 Dec 2007 07:41:04 -0700)
Lines: 27
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail