CView::OnDropEx

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

Return Value

The drop effect that resulted from the drop attempt at the location specified by point. This must be one of the values indicated by dropEffectList. Drop effects are discussed in the Remarks section.

Parameters

pDataObject

Points to the COleDataObject that is dropped into the drop target.

dropDefault

The effect that the user chose for the default drop operation based on the current key state. It may 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

The current mouse position relative to the view client area.

Remarks

Called by the framework when the user releases a data object over a valid drop target. The default implementation is to do nothing and return a dummy value ( -1 ) to indicate that the framework should call the OnDrop handler.

Override this function to implement the effect of an right mouse-button drag and drop. Right mouse-button drag and drop typically displays a menu of choices when the right mouse-button is released.

Your override of OnDropEx should query for the right mouse-button. You can call GetKeyState or store the right mouse-button state from your OnDragEnter handler.

Use pDataObject to examine the COleDataObject for Clipboard data format and data dropped at the specified point.

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

For more information on setting the default menu command, see SetMenuDefaultItem in the Win32 documentation and CMenu::GetSafeHmenu in this volume.

CView OverviewClass MembersHierarchy Chart

See Also   CView::OnDragEnter, CView::OnDragOver, CView::OnDrop, CView::OnDragLeave, COleDropTarget::OnDropEx