I have a problem with a CFileDialog on some PCs running Windows 7 while it works correct on some other PCs, even running Windows 7. Since I yet wasn't able to find any differences between those PCs I want to ask if maybe anyone here already had similar problems and/or can provide me with any helpful information.
I am able to reproduce the problem by simply creating a standard MFC MDI application with VisualStudio 2010.
The problem is about links (LNK files): When I create a LNK file for a file registered as document type for my application in a folder I can see the correct icon and file-type description in Explorer, i.e.:
(Verküpfung is german for Link
But when I open the same folder from in the CFileDialog shown by CWinApp::OnFileOpen
first the LNK files aren't shown at all, I need to enter i.e. a *.* to the filename edit box to get them shown, but then they don't have the correct icon and file-type description. Even LNK files referencing other registered file types aren't shown correctly:
When I open such a LNK file in the CFileDialog the path passed to CWinApp::OpenDocumentFile
is the path to the LNK file, not the path to the referenced file allthough when I open a file via double-click on the same LNK file in Explorer the path passed to CWinApp::OpenDocumentFile
is the correct path of the referenced file.
When I do the same on my other PC it is shown correctly without the need to enter *.* and the path passed to CWinApp::OpenDocumentFile
is even correct:
I suspect this is caused by some kind of Windows configuration or policies or something else since the codes and binaries I tested on both PCs are equal. The two PCs I used to test are setup quite similar, almost all software installed there is equal.
Does anyone have an idea what might be the cause and/or a solution?
Thanks in advance,
[Edited: Additional info] I found some other strange problem: From within the file open dialog I cannot use UNC paths (an error message like 'can't access' with error code 0x80004005) and the folder list is either messed up or doesn't show network at all:
Further instead of my above mentioned guess it's a Windows configuration thing I found the problem doesn't occur in older builds of my program. But I have absoluteley no idea what might have been changed in my project which could affect the behavior of CFileDialog this way.