Article View: borland.public.cppbuilder.nativeapi
Article #2355Re: Shbrowseforfolder edit box problems
From: Bob Gonder
Date: Mon, 05 Mar 2007 22:49
Date: Mon, 05 Mar 2007 22:49
28 lines
1768 bytes
1768 bytes
Remy Lebeau (TeamB) wrote:
> LPITEMIDLIST mjites = SHBrowseForFolder(&mjbi);
> if( mjites )
> {
> rcvdir[0] = 0;
> SHGetPathFromIDList(mjites, rcvdir);
> CoTaskMemFree(mjites);
> }
I seem to always get a pidl returned when Validate closes the dialog
(return 0;) So the above should always run unless the Cancel was
pressed. But that would overwrite the manual entry copied by the
Validate code.
That's why I checked rcvdir[0] instead of mjites after the call.
(another way)
> if( mjites )
> {
if( rcvdir[0] == 0 )
{
> SHGetPathFromIDList(mjites, rcvdir);
}else{
//nothing, rcvdir filled in by Validate
};
> CoTaskMemFree(mjites);
> }
Technical Details
Message-ID:
<5t6pu2922athot41785ihioe33et7h0mao@4ax.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<45ec10db$1@newsgroups.borland.com> <45ec6a71@newsgroups.borland.com> <45ec71a5$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 14:49:09 -0800 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <5t6pu2922athot41785ihioe33et7h0mao@4ax.com> References: <45ec10db$1@newsgroups.borland.com> <45ec6a71@newsgroups.borland.com> <45ec71a5$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 1173134926 71.0.34.200 (5 Mar 2007 14:48:46 -0800) Lines: 32 Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail