覆盖Shell扩展的拖放 [英] Override Drag and drop for Shell Extension

查看:159
本文介绍了覆盖Shell扩展的拖放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用C ++中的ShellExtension代码。我正在创建一个虚拟驱动器。其中代表网络中的某个存储库。我现在想要的是为此驱动器启用拖放功能。我想让用户将文件拖动到该虚拟驱动器,然后我必须能抓住该事件,以便我可以执行我的自定义操作。到目前为止,我无法找到任何这样的事件或接口。我尝试使用 IDragAndDrop 接口,但是其rgs文件没有正确注册。是否有任何出路?

解决方案

MSDN的文档涵盖您要求的内容:



处理Shell数据传输方案



实现基本文件夹对象接口(特别是IShellFolder :: GetUIObjectOf()可以返回IDataObject或IDropTarget接口)



创建拖放处理程序


I am working on a ShellExtension code in C++. I am creating a Virtual Drive. Which represents a repository somewhere in the Network. What I want now is to enable Drag-Drop functionality to this Drive. I want to enable user to drag the file to that Virtual Drive and then I must be able to Grab that event, so that I can perform my custom operation. I am not able to find any of such Event or Interface so far. I tried using IDragAndDrop interface, but its rgs files were not registering properly. Is there any way out?

解决方案

What you ask for is covered in MSDN's documentation:

Handling Shell Data Transfer Scenarios

Implementing the Basic Folder Object Interfaces (in particular, IShellFolder::GetUIObjectOf() can return an IDataObject or IDropTarget interface)

Creating Drop Handlers

这篇关于覆盖Shell扩展的拖放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆