For PM applications, the Workplace Shell sends DM_ messages to PM windows using the standard or enhanced direct manipulation protocols. The Workplace Shell will drag source objects rendered as OBJECT or as OS2FILE and will accept source objects rendered in the same way. The Workplace Shell also will send a DM_PRINTOBJECT message to items dropped on the printer object.
Users can drag source objects over windows that an object creates. When this occurs, the Workplace Shell sends DM_ messages to these windows. Therefore, window procedures associated with the windows that the object creates must be able to process DM_ messages.
Target objects are not necessarily able to process every type of source object that is dropped on them. They are, however, capable of processing more than one type of dropped source object. Printer objects, for example, cannot print binary files, but they can print both text and graphics files. Because of differing capabilities, each target object should determine if it can process the source object being dropped on it. The following table shows the direct manipulation messages that are sent to target objects and the methods that are invoked by the Workplace Shell:
┌───────────────┬─────────────────┬──────────┬──────────────────┐ │Description │Method Name │Invoked On│Message Name │ ├───────────────┼─────────────────┼──────────┼──────────────────┤ │Format drag │wpFormatDragItem │Source │None │ │information │ │ │ │ ├───────────────┼─────────────────┼──────────┼──────────────────┤ │Request │wpRender │Source │DM_RENDER │ │rendering │ │ │ │ │format │ │ │ │ ├───────────────┼─────────────────┼──────────┼──────────────────┤ │Rendering │wpRenderComplete │Target │DM_RENDERCOMPLETE │ │request │ │ │ │ │completed │ │ │ │ ├───────────────┼─────────────────┼──────────┼──────────────────┤ │Objects being │wpDragOver │Target │DM_DRAGOVER │ │dragged over │ │ │ │ ├───────────────┼─────────────────┼──────────┼──────────────────┤ │Object has been│wpDrop │Source │DM_DROP │ │dropped │ │ │ │ ├───────────────┼─────────────────┼──────────┼──────────────────┤ │Drag/Drop is │wpEndConversation│Target │DM_ENDCONVERSATION│ │complete │ │ │ │ └───────────────┴─────────────────┴──────────┴──────────────────┘
The "Source" and "Target" windows in the following diagram represent windows that have been subclassed, via CnrOwnerSubclassProc, by the Workplace Shell:
┌──────────────────────────────────────────────────────┐ │ Source Target │ └──────────────────────────────────────────────────────┘ │ │ User begins drag │ │ (WM_BEGINDRAG ────────>│ │ or │ │ WM_PICKUP) │ │ │ │ │ │ wpFormatDragItem(sourceobject) │ │ │ │ DM_DRAGOVER │ .>│───────────────────────────────>│ . │ │ . │ wpDragOver(targetobject) . │ │ . │ DDR_ response │ ..│<───────────────────────────────│ │ │ User ends drag │ │ (WM_ENDDRAG)──────────>│ │ │ DM_DROP │ │───────────────────────────────>│ │ │ │ wpDrop(targetobject) │ │ ... If source rendering is indicated ... │ │ │ │ │ DM_RENDERPREPARE │ │ (If necessary) │ │<───────────────────────────────│<. │ │ . │ DM_RENDER │ . │ (If supported) │ . │<───────────────────────────────│ . │ │ . wpRender(sourceobject) │ . │ │ . │ DM_RENDERCOMPLETE │ . │───────────────────────────────>│ . │ │.. │ │ │ wpRenderComplete(targetobject) │ │ │ │ │ │ │ │ │ DM_ENDCONVERSATION │ │<───────────────────────────────│ │ │ wpEndConversation(sourceobject)