Browse for folder can't see camera device

Posted by Robert Frank on Stack Overflow See other posts from Stack Overflow or by Robert Frank
Published on 2010-06-09T13:05:19Z Indexed on 2010/06/09 13:22 UTC
Read the original article Hit count: 180

Filed under:
|

In Delphi 2010, I want to allow users to browse and select a folder. The folder is on a device (?) created by a DSLR:

Image of folder

The folder is visible in the Windows Explorer as shown above. And, the folder is visible in a TOpenDialog, allowing them to browse into the folder and choose a file.

Unfortunately, I have been unable to get either SHBrowseForFolder (code I found on the web but don't understand) or SelectDirectory to see the camera device or folder beneath it. (Side note: IMO, SelectDirectory is a far nicer UI, since the user can see the files in the folders while browsing.)

I assume this has to do with the fact that the folder is in a device (?) created by the camera software.

I've seen some tricks where you call TOpenDialog to browse for folders with '*.' and then ExtractFileDir on the result, but that's not robust or, IMO, a good UI.

What I'm looking for is a "Browse for folder" that can see the same devices (including the camera device) the TOpenDialog & Windows Explorer can see. (Ideally, it would have the nice appearance like the one below!)

Any suggestions?

Image of a MS-Word's folder browsing in Win7. (I wonder if it looks this pretty in XP.)

Image of MS-Word folder browsing

© Stack Overflow or respective owner

Related posts about delphi

Related posts about winapi