获取快捷方式文件路径时出现问题!
在我的应用程序中,我可以选择将文件添加到列表中。它可以让用户同时选择多个文件吗?我使用 CFileDialog 来执行此操作,并且我启用了 OFN_MULTISELECT (用于多选)...问题我面临的是,当我尝试添加快捷方式文件时..它没有采用实际的快捷方式路径,而是引用实际路径。实际上我想避免快捷方式文件被添加到我的列表中,但是正在添加的每个快捷方式文件没有扩展名“.lnk”(我不知道原因)。 那么,有什么办法可以让我们忽略添加的快捷方式文件呢?
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 reason).
So,is there any way that we can neglect the shortcut file being added.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要旗帜:
问候
哎呀
PS:它不会忽略添加链接,但它确保链接保持原样。您将获得带有 *.lnk 扩展名的链接文件。之后您可以在代码中过滤掉它们。
You need the flag:
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.