是什么导致 OLE DoDragDrop 拖动的项目在放置目标上更改为禁止放置图标?

发布于 2024-08-01 17:23:21 字数 56 浏览 7 评论 0原文

我所说的禁止掉落图标是指带有斜杠的圆圈,表示您不能在给定位置掉落。 哪个函数负责触发此图标更改?

By the no-drop icon I mean the circle with a slash indicating that you can't drop in the given location. Which function is responsible for triggering this icon change?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

忱杏 2024-08-08 17:23:21

查看 IDropTarget 中的 DragEnter 函数IDropSource 接口

Check out the DragEnter function in the IDropTarget COM interface and the GiveFeedback function in the IDropSource interface

不忘初心 2024-08-08 17:23:21

我认为这个摘录给出了答案:

修改鼠标指针为
指示控件将如何响应,如果
数据被放到它上面涉及
两步:确定什么类型
数据位于 DataObject 对象中,使用
GetFormat方法,然后设置
OLEDragOver 的效果参数
事件通知来源什么下降
此控件允许使用效果。

OLEDragOver 事件

当目标控件的 OLEDropMode
属性设置为手动,则
OLEDragOver 事件被触发
每当拖动的数据经过
控制。

OLEDragOver 的效果参数
event 用于指定执行什么操作
如果该对象是
掉了。 当设置该值时,
源的 OLEGiveFeedback 事件是
触发。 OLEGiveFeedback 事件
包含它自己的效果参数,
用于提供视觉
向用户反馈什么操作
将在选择时进行
拖动 — 即,鼠标指针处于
更改为表示复制、移动或
“不掉落”动作。

替代文本 http://img188.imageshack.us/img188/3531/dragseqdrag.gif< /a>

I think this excerpt gives the answer:

Modifying the mouse pointer to
indicate how a control will respond if
the data is dropped onto it involves
two steps: determining what type of
data is in the DataObject object using
the GetFormat method, and then setting
the effect argument of the OLEDragOver
event to inform the source what drop
effects are allowed for this control.

The OLEDragOver Event

When a target control’s OLEDropMode
property is set to Manual, the
OLEDragOver event is triggered
whenever dragged data passes over the
control.

The effect argument of the OLEDragOver
event is used to specify what action
would be taken if the object were
dropped. When this value is set, the
source’s OLEGiveFeedback event is
triggered. The OLEGiveFeedback event
contains its own effect argument,
which is used to provide visual
feedback to the user on what action
will be taken when the selection is
dragged — i.e., the mouse pointer is
changed to indicate a copy, move, or
"no drop" action.

alt text http://img188.imageshack.us/img188/3531/dragseqdrag.gif

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文