DROPEFFECT Constants

Represents information about the effects of a drag-and-drop operation. The DoDragDrop function and many of the methods in the IDropSource and IDropTarget use the values of this enumeration.

Constant/value Description
DROPEFFECT_NONE
0
Drop target cannot accept the data.
DROPEFFECT_COPY
1
Drop results in a copy. The original data is untouched by the drag source.
DROPEFFECT_MOVE
2
Drag source should remove the data.
DROPEFFECT_LINK
4
Drag source should create a link to the original data.
DROPEFFECT_SCROLL
0x80000000
Scrolling is about to start or is currently occurring in the target. This value is used in addition to the other values.

Remarks

Your application should always mask values from the DROPEFFECT enumeration to ensure compatibility with future implementations. Presently, only some of the positions in a DROPEFFECT value have meaning. In the future, more interpretations for the bits will be added. Drag sources and drop targets should carefully mask these values appropriately before comparing. They should never compare a DROPEFFECT against, say, DROPEFFECT_COPY by doing the following:

if (dwDropEffect == DROPEFFECT_COPY)... 

Instead, the application should always mask for the value or values being sought as using one of the following techniques:

if (dwDropEffect & DROPEFFECT_COPY) == DROPEFFECT_COPY)...

if (dwDropEffect & DROPEFFECT_COPY)... 

This allows for the definition of new drop effects, while preserving backward compatibility with existing code.

Requirements

Requirement Value
Minimum supported client
Windows 2000 Professional [desktop apps only]
Minimum supported server
Windows 2000 Server [desktop apps only]
Header
OleIdl.h

See also

DoDragDrop

IDropSource

IDropTarget