Article View: borland.public.cppbuilder.nativeapi
Article #7461Re: OpenDialog (GetOpenFileName) + FTP
From: Timothy H. Buchman
Date: Tue, 01 Feb 2005 00:58
Date: Tue, 01 Feb 2005 00:58
31 lines
2396 bytes
2396 bytes
> 1) How can I disable ftp site acces in OpenDialog ? > (the user still needs access to regular network files) > > 2) How do I know it's an ftp file and it's location? > (right now i check for "Temporary Internet Files" in the file > name) There isn't a built-in mechanism. With some effort, you can (quoting the Help for TOpenDialog::OnCanClose),"Write an OnCanClose event handler to provide custom validation of the value of FileName.". Off the top of my head, I might guess that you could check whether there's a drive letter and colon in the path, or something like that. You have started to study that, but I don't know the real answer to question 2. You can find examples of overriding TOpenDialog events here: http://home.att.net/~secondcut/opdlgvcl.htm A more sophisticated (but very ,very code-intensive) example would be to review the filenames presented by the OS before they are displayed, and discarding those you don't want used. This is exponentially more work: http://home.att.net/~secondcut/bcbexam.htm -- Timothy H. Buchman ======================================== City Center Theater, New York NY mail address tbuchmanPLEASE(at sign)REMOVEcitycenterD O Torg Search .borland message archive on http://www.tamaracka.com/search.htm
Technical Details
Message-ID:
<41fed426@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!194.117.148.138.MISMATCH!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<41f010ae$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,c49d7f4ff5620ace X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Timothy H. Buchman" <tbuchmanREMOVE(at)PLEASEcitycenter D O To r g> Newsgroups: borland.public.cppbuilder.nativeapi References: <41f010ae$1@newsgroups.borland.com> Subject: Re: OpenDialog (GetOpenFileName) + FTP Date: Mon, 31 Jan 2005 19:58:03 -0500 Lines: 32 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 NNTP-Posting-Host: 69.3.192.159 Message-ID: <41fed426@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1107219494 69.3.192.159 (31 Jan 2005 16:58:14 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!194.117.148.138.MISMATCH!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail