Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

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/valueDescription
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

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

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.