wpDroppedOnObject
This instance method is called on an object that has just been dragged (a source object) when the target object that it was dropped on does not know what action to perform. This instance method is called only on a source object when that source object has previously responded favorably to a wpDraggedOverObject instance method call.
Syntax
_wpDroppedOnObject(somSelf, DroppedOnObject)
Parameters
- somSelf (WPObject *) - input
- Pointer to the object on which the method is being invoked.
- Points to an object of class WPObject.
- DroppedOnObject (WPObject *) - input
- Pointer to the object that was dropped on.
- The current target object for the drag operation.
Returns
- rc (BOOL) - returns
- Return code.
- TRUE The drop action was successful.
- FALSE Error occurred.
How to Override
Object classes that override the wpDraggedOverObject instance method would normally be expected to also override this method.
Usage
Target objects that do not know how to handle the current drop operation can call this method on the source object that was dropped on it. This method would not normally be called outside the scope of a drag or drop operation.
Example Code
#define INCL_WINWORKPLACE #include <os2.h> WPObject *somSelf; /* Pointer to the object on which the method is being invoked. */ WPObject *DroppedOnObject; /* Pointer to the object that was dropped on. */ BOOL rc; /* Return code. */ rc = _wpDroppedOnObject(somSelf, DroppedOnObject);
Remarks
When you drop on a target object and the source object has said it knows how to handle the drop operation, this method will be invoked on the source object. For example, the WPProgram object class supports being dropped on certain other classes of object where the drop action will be taken by the program itself. The drop action provided in **WPProgram**'s override of the **wpDroppedOnObject** method would be to execute itself as a viewer of the target object. This method is called as a result of a `DM_DROP` message being sent.