Response to Messages Sent to a Target Application

The following table shows the four possible responses available to the target when it receives a DM_DRAGOVER message. The target sends these values to the window handle specified in the DRAGINFO data structure.

┌────────────────────┬────────────────────────────────────────┐
│Message Name        │Description                             │
├────────────────────┼────────────────────────────────────────┤
│DOR_DROP            │Sent if the objects being dragged are   │
│                    │acceptable. A drop does not occur unless│
│                    │DOR_DROP is returned.                   │
├────────────────────┼────────────────────────────────────────┤
│DOR_NODROP          │Sent if the objects being dragged are   │
│                    │acceptable and the target supports the  │
│                    │current operation, but the objects      │
│                    │cannot be dropped on the current        │
│                    │location in the target window. For      │
│                    │example, a list box might return        │
│                    │DOR_NODROP if it contains objects that  │
│                    │can be dropped on, but the pointer is   │
│                    │over an object that cannot be dropped   │
│                    │on.                                     │
│                    │If the target response is DOR_NODROP,   │
│                    │the DM_DRAGOVER message continues to be │
│                    │sent to the target when:                │
│                    │o The pointer is moved                  │
│                    │o A keyboard key is pressed             │
│                    │o The pointer is moved out of           │
│                    │  and back into the window.             │
├────────────────────┼────────────────────────────────────────┤
│DOR_NODROPOP        │Sent if the objects being dragged are   │
│                    │acceptable, but the target does not     │
│                    │support the current operation. This     │
│                    │response implies that the drop may be   │
│                    │valid if the drag operation changes. For│
│                    │example, copying a file to a shredder   │
│                    │would not be valid, but moving a file to│
│                    │a shredder would be.                    │
│                    │Once the target has sent DOR_NODROPOP,  │
│                    │no further DM_DRAGOVER messages is sent │
│                    │to the target until:                    │
│                    │o A keyboard key is pressed             │
│                    │o The pointer is moved out of           │
│                    │  and back into the window.             │
├────────────────────┼────────────────────────────────────────┤
│DOR_NEVERDROP       │Sent when the objects being dragged are │
│                    │not acceptable, and the target will     │
│                    │never accept them.                      │
│                    │Once the target has sent DOR_NEVERDROP, │
│                    │no further DM_DRAGOVER messages are sent│
│                    │to that target until the pointer is     │
│                    │moved out of and back into the target   │
│                    │window.                                 │
└────────────────────┴────────────────────────────────────────┘

If a reply other than DOR_DROP is received from a target, the augmentation emphasis is automatically changed to indicate that no drop is allowed. This gives the user a visible cue that a drop cannot occur. The emphasis is reverted to drop allowed when a DOR_DROP reply is received from some target.


[Back: Messages Sent to a Target Application]
[Next: Two-Object Drag Operation]