🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: SHBrowseForFolder

#9807
From: Remy Lebeau (TeamB)
Date: Tue, 08 Jun 2004 17:45
26 lines
1746 bytes
"JD" <nospam@nospam.com> wrote in message
news:40c56f71$1@newsgroups.borland.com...

> Assuming that I have a desired path in an AnsiString,
> how do I get it assigned as the initial directory?

You need to use a callback function with the BROWSEINFO's lpfn member.  When
the callback function is called during the dialog's initialization, look for
the BFFM_INITIALIZED notification.  When detected, then you an send the
dialog a BFFM_SETSELECTION message to set the selected folder.

> I know that I need to set the pidlRoot member
> of the BROWSEINFO structure

Wrong.

> but I can't figure out how to get the initial path into
> an ITEMIDLIST.

That is not the correct way to go.  The pidlRoot is not the initial
directory.  It is the top-level item that appears in the displayed TreeView,
hense the "root" of the browse dialog.


Gambit
Technical Details
Message-ID: <40c5fc3b$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <40c56f71$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,179ca2994416d9ea
X-Google-Attributes: gid10cc67,public
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <40c56f71$1@newsgroups.borland.com>
Subject: Re: SHBrowseForFolder
Date: Tue, 8 Jun 2004 10:45:40 -0700
Lines: 28
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.169.168.124
Message-ID: <40c5fc3b$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1086716987 68.169.168.124 (8 Jun 2004 10:49:47 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail