• Advertisement

Archived

This topic is now archived and is closed to further replies.

Browse for folder question

This topic is 5416 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''ve got the thing working and can get the file name when the user selects a folder from the tree and presses OK. But how do I get the file name when the user types it in the edit box and presses OK? Seems just to pass back a empty string.

Share this post


Link to post
Share on other sites
Advertisement
This is what I got:

LPITEMIDLIST ItemID;

bi.hwndOwner = hWnd;
bi.pidlRoot = NULL;
bi.pszDisplayName = szName;
bi.lpszTitle = NULL;
bi.ulFlags = BIF_EDITBOX;
bi.lpfn = BrowseCallbackProc;
bi.lParam = (LPARAM)pathname;
bi.iImage = 0;

if (ItemID = SHBrowseForFolder(&bi))
{
SHGetPathFromIDList(ItemID, dirpath);

return dirpath;
}
else
{
return NULL;
}

It works fine if you select from the directory tree. Just nothing if you type in a path.

[edited by - darkchrono4 on April 29, 2003 9:09:00 PM]

Share this post


Link to post
Share on other sites

  • Advertisement