Problem in getting the path of a shortcut file!
In my application,I have an option of adding files to a list..were it will let the user to select multiple files at the same..am using CFileDialog to do tis and I enabled OFN_MULTISELECT (for multiselect)...The problem am facing is,When I try to add a shortcut file..its not taking the actual shortcut path,its reffering to the actual path.Actually I wanted to avoid shortcut file being added to my list,but every shortcut file that is being added does not have the extension ".lnk"(i dont know the reas开发者_如何转开发on). So,is there any way that we can neglect the shortcut file being added.
You need the flag:
OFN_NODEREFERENCELINKS = 0x100000;
regards Oops PS: it does not neglect links from being added, but it ensures to let the link as it is. You will get files with *.lnk extensions for links. afterwards you can filter them out in you code.
精彩评论