COleDropTarget::OnDropEx

Called by the framework when a drop operation is to occur.

virtual DROPEFFECT OnDropEx( 
   CWnd* pWnd, 
   COleDataObject* pDataObject, 
   DROPEFFECT dropDefault, 
   DROPEFFECT dropList, 
   CPoint point  
);

Parameters

  • pWnd
    Points to the window the cursor is currently over.

  • pDataObject
    Points to the data object that contains the data to be dropped.

  • dropDefault
    The effect that the user chose for the default drop operation based on the current key state. It can be DROPEFFECT_NONE. Drop effects are discussed in the Remarks section.

  • dropList
    A list of the drop effects that the drop source supports. Drop effect values can be combined using the bitwise OR (|) operation. Drop effects are discussed in the Remarks section.

  • point
    Contains the location of the cursor, in pixels, relative to the screen.

Return Value

The drop effect that resulted from the drop attempt at the location specified by point. Drop effects are discussed in the Remarks section.

Remarks

The framework first calls this function. If it does not handle the drop, the framework then calls OnDrop. Typically, you will override OnDropEx in the view class to support right mouse-button drag and drop. Typically, the view class OnDrop is used to handle the case of support for simple drag and drop.

The default implementation of COleDropTarget::OnDropEx calls CView::OnDropEx. By default, CView::OnDropEx simply returns a dummy value to indicate the OnDrop member function should be called.

Drop effects describe the action associated with a drop operation. See the following list of drop effects:

  • DROPEFFECT_NONE   A drop would not be allowed.

  • DROPEFFECT_COPY   A copy operation would be performed.

  • DROPEFFECT_MOVE   A move operation would be performed.

  • DROPEFFECT_LINK   A link from the dropped data to the original data would be established.

  • DROPEFFECT_SCROLL   Indicates that a drag scroll operation is about to occur or is occurring in the target.

For more information, see IDropTarget::Drop in the Windows SDK.

Requirements

Header: afxole.h

See Also

Reference

COleDropTarget Class

Hierarchy Chart

COleDropTarget::OnDragOver

COleDropTarget::OnDragEnter