I have a class derived from CFileDialog, and I want to do some processing of user-selected files as the selections change. In my class, I override the OnFileNameOK, OnFileNameChange, and OnFolderChange methods to get the new list of selected files (full paths). I can't rely on CFileDialog's GetFileName or GetPathName/GetNextPathName to get this list of files, because 1) even when the user clears the selection, these still return the previously-selected values, and 2) I need to be able to tell the difference between folders and files.
So I'm trying to go the COM route. I have a small helper class that tries to do the dirty work for me. In the overrides of the methods above, I call GetSelectedFiles on the member instance of this helper I create in my dialog's constructor. This works great, however I've found that if the user clicks the Libraries shortcut on the left, then goes into Documents, it doesn't seem to work. The GetFolderPath called from the helper returns an empty string (when I'd expect it to return some symbolic string at least that other COM methods would know how to interpret). Interestingly enough, if I create a subfolder and navigate into it, I can get the selected files.
I'd consider myself less than a novice at COM, so any help would be appreciated. Please see my attached helper.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.