TOPIC: browsefoldername
browsefoldername 3 Years, 7 Months ago

is it possible to init the folder name in the
browsefoldername function.

How to get the pidlRoot in the browseinfo object ?

is it this value to get

Help me please

thanks for response

Re:browsefoldername 3 Years, 7 Months ago
Sorry, I do not know how to do that. You can try to find the answer from MSDN or maybe you can find an example somewhere else on the net.
Re:browsefoldername 3 Years, 7 Months ago

actually the browsefoldername function is

// Copyright (C) 2004 Suneido Software Corp. All rights reserved worldwide.
function (hwnd = 0, title = 'Browse for Folder')
title = TranslateLanguage(title)
lpszTitle: title, pszDisplayName: Buffer(260), hwndOwner: hwnd)

if 0 is (pidl = SHBrowseForFolder(bi))
return ''

pszPath = Buffer(260)
if 0 is SHGetPathFromIDList(pidl, pszPath)
return ''

return pszPath

I have got a look over the msdn library

first the ulFlags "BIF.USENEWUI" isn't useful

to set a folder previously selected it is necessary to set
the "bi" Object member 'pidlRoot' in the browseInfo Structure.

for that i have found 2 methods

IPersistIDList::GetIDList Method
IKnownFolder::GetId Method

I am not sure of the result.

can you have a look please to help me ?

I think it is very useful to set folder in any software !
at less a directory for backup for exemple.
The result could be very interesting for every body


Re:browsefoldername 3 Years, 7 Months ago
There seem to be two options - one is to set the root of the tree, the other is to select/go to a certain directory at startup.

To set the root, you need the PIDL which you may be able to get from ILCreateFromPath

To set the initial select you need to use a callback as in this example:

Hope that gives you some clues. Google and MSDN are your friends :-)