CView::OnDragEnter

virtual DROPEFFECT OnDragEnter( 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 usually depends on the current key state 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 into the drop area of the view.

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 client area of the view.

Remarks

Called by the framework when the mouse first enters the non-scrolling region of the drop target window. Default implementation is to do nothing and return DROPEFFECT_NONE.

Override this function to prepare for future calls to the OnDragOver member function. Any data required from the data object should be retrieved at this time for later use in the OnDragOver member function. The view should also be updated at this time to give the user visual feedback.  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::OnDragOver, CView::OnDrop, CView::OnDropEx, CView::OnDragLeave, COleDropTarget::OnDragEnter