TOPIC: browsefoldername
#550
browsefoldername 3 Years, 7 Months ago
Hi

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


didierb
 
 
#554
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.
 
 
andrew
 
#563
Re:browsefoldername 3 Years, 7 Months ago
Hi,


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)
bi = Object(ulFlags: BIF.USENEWUI | BIF.RETURNONLYFSDIRS | BIF.STATUSTEXT,
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
and
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

thanks

db
 
 
#566
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:

www.codeproject.com/dialog/XBrowseForFolder.asp

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