[英]How can I put a file path into the clipboard so that it can be pasted as file in a file manager?
I want the user to be able to copy a file that's stored on disk from my GTK application to a normal file manager like Nautilus. 我希望用户能够将存储在磁盘上的文件从我的GTK应用程序复制到Nautilus这样的普通文件管理器。 How can I do that?
我怎样才能做到这一点? I would prefer to just write a path into the clipboard and let the file manager take care of actually copying, is that possible?
我希望只在剪贴板中写一个路径,然后让文件管理器负责实际复制,这可能吗?
I just found an example in which it seems as if the actual file data is transferred through the clipboard – but is that the only possible way? 我只是找到一个示例,其中看起来好像实际文件数据是通过剪贴板传输的,但这是唯一可行的方法吗?
You need CF_HDROP and possibly other shell clipboard formats. 您需要CF_HDROP以及可能的其他外壳剪贴板格式。 See: http://msdn.microsoft.com/en-us/library/windows/desktop/bb776902(v=vs.85).aspx ;
请参阅: http : //msdn.microsoft.com/zh-cn/library/windows/desktop/bb776902(v=vs.85).aspx ;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.