CView::OnDragOver

virtual DROPEFFECT OnDragOver( COleDataObject* pDataObject, DWORD dwKeyState, CPoint point );

Return Value

A value from the DROPEFFECT enumerated type, which indicates the type of drop that would occur if the user dropped the object at this position. The type of drop often depends on the current key state as indicated by dwKeyState. A standard mapping of keystates to DROPEFFECT values is:

For more information, see the MFC Advanced Concepts sample OCLIENT.

Parameters

pDataObject

Points to the COleDataObject being dragged over the drop target.

dwKeyState

Contains the state of the modifier keys. This is a combination of any number of the following: MK_CONTROL, MK_SHIFT, MK_ALT, MK_LBUTTON, MK_MBUTTON, and MK_RBUTTON.

point

The current mouse position relative to the view client area.

Remarks

Called by the framework during a drag operation when the mouse is moved over the drop target window. The default implementation is to do nothing and return DROPEFFECT_NONE.

Override this function to give the user visual feedback during the drag operation. Since this function is called continuously, any code contained within it should be optimized as much as possible. For more information, see the article Drag and Drop: Implementing a Drop Target in Visual C++ Programmer’s Guide.

CView OverviewClass MembersHierarchy Chart

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