OLEDropHasData, OLEDropEffects
These properties give the drop target a chance to decide how to handle dropped data. OLEDropHasData indicates whether the drop target is compatible with the data being dragged. OLEDropEffects determines the actions the drop target supports.
Usage |
oObject.OLEDropHasData = nIsItAcceptable nIsItAcceptable = oObject.OLEDropHasData oObject.OLEDropEffects = nActionsAccepted nActionsAccepted = oObject.OLEDropEffects |
Parameter |
Value |
Meaning |
nIsItAcceptable |
-1 |
Let VFP figure out whether this drop target can accept any of the data that's being dragged. This is the default. |
0 |
The drop target can't accept any of the data that's being dragged. |
|
1 |
The drop target can accept some form of the data being dragged. |
|
nActionsAccepted (add all desired values together) |
0 |
The drop target doesn't accept any drops. |
1 |
Data can be copied to this target. |
|
2 |
Data can be moved to this target. |
|
4 |
A link can be created between this object and source data. This option isn't relevant for native VFP objects because they don't have the capability of handling linked data. |
Example |
* Say, text dragged onto a form should be used * to change the form's Caption. In the form's OLEDragOver * method, put this code: #INCLUDE FOXPRO.H IF oDataObject.GetFormat(1) This.OLEDropHasData = 1 * allow either move or copy This.OLEDropEffects = DROPEFFECT_COPY + DROPEFFECT_MOVE ENDIF |
See Also |
DataObject, GetFormat, OLE drag and drop, OLEDrag, OLEDragOver, OLEDragDrop |