次の方法で共有


COleDropTarget Class

Provides the communication mechanism between a window and the OLE libraries.

class COleDropTarget : public CCmdTarget

Members

Public Constructors

Name

Description

COleDropTarget::COleDropTarget

Constructs a COleDropTarget object.

Public Methods

Name

Description

COleDropTarget::OnDragEnter

Called when the cursor first enters the window.

COleDropTarget::OnDragLeave

Called when the cursor is dragged out of the window.

COleDropTarget::OnDragOver

Called repeatedly when the cursor is dragged over the window.

COleDropTarget::OnDragScroll

Called to determine whether the cursor is dragged into the scroll region of the window.

COleDropTarget::OnDrop

Called when data is dropped into the window, default handler.

COleDropTarget::OnDropEx

Called when data is dropped into the window, initial handler.

COleDropTarget::Register

Registers the window as a valid drop target.

COleDropTarget::Revoke

Causes the window to cease being a valid drop target.

Remarks

Creating an object of this class allows a window to accept data through the OLE drag-and-drop mechanism.

To get a window to accept drop commands, you should first create an object of the COleDropTarget class, and then call the Register function with a pointer to the desired CWnd object as the only parameter.

For more information on drag-and-drop operations using OLE, see the article Drag and Drop (OLE).

Inheritance Hierarchy

CObject

CCmdTarget

COleDropTarget

Requirements

Header: afxole.h

See Also

Reference

CCmdTarget Class

Hierarchy Chart

COleDropSource Class

Concepts

MFC Sample HIERSVR

MFC Sample OCLIENT