Article View: borland.public.cppbuilder.nativeapi
Article #2360Re: Shbrowseforfolder edit box problems
From: Bob Gonder
Date: Tue, 06 Mar 2007 02:30
Date: Tue, 06 Mar 2007 02:30
31 lines
1897 bytes
1897 bytes
Remy Lebeau (TeamB) wrote:
> LPITEMIDLIST pidl = SHBrowseForFolder(&bi);
> if( pidl )
> {
> if( path[0] != 0 )
> {
> // user text was entered ...
> }
> else
> {
> // no user text was entered ...
> SHGetPathFromIDList(pidl, path);
> }
>
> CoTaskMemFree(pidl);
> Edit1->Text = path;
> }
> else
> {
> // dialog canceled...
> }
Hey!
That's my code!
Glad I'm not terminally stupid.
Also see now that SHBrowseForFolder returns NULL when Validate returns
0 and BIF_NEWDIALOGSTYLE is turned off (I was testing with the OPs
settings)
Thanks for the elephant, MS !
Technical Details
Message-ID:
<eejpu2lv44tq8lo0jm7n3lgeq38fs15cam@4ax.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<45ec10db$1@newsgroups.borland.com> <45ec6a71@newsgroups.borland.com> <45ec71a5$1@newsgroups.borland.com> <45eca715@newsgroups.borland.com> <45ecaee8$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,149a673c2d92f69f X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Shbrowseforfolder edit box problems Date: Mon, 05 Mar 2007 18:30:13 -0800 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <eejpu2lv44tq8lo0jm7n3lgeq38fs15cam@4ax.com> References: <45ec10db$1@newsgroups.borland.com> <45ec6a71@newsgroups.borland.com> <45ec71a5$1@newsgroups.borland.com> <45eca715@newsgroups.borland.com> <45ecaee8$1@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 71.0.34.200 X-Trace: newsgroups.borland.com 1173148190 71.0.34.200 (5 Mar 2007 18:29:50 -0800) Lines: 33 Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail