Direct manipulation offers various ways for source and target applications to exchange data. To accomplish the exchange, a separate conversation must be established to transfer each data object from the source to the target. The target must inform the source about the rendering mechanism it is using and the format in which the data is to be exchanged. The target can establish the conversations to run in parallel, or it can initiate the conversations in a serial fashion.

The target determines which rendering mechanism and format to use in the following manner:

2.

The following sample code shows how the target checks the rendering mechanism and format:

          /* Now, we need to look at each item in turn */          for (i = 0; i < cItems; i++)
          {
            dragItem = DrgQueryDragitemPtr(dragInfo, i);

            /* Make sure we can move for a Move request */
            /* or copy for a Copy                       */
            if (((dragItem->fsSupportedOps & DO_COPYABLE)   &&
                 (usOp == (USHORT)DO_COPY))                 ||
                ((dragItem->fsSupportedOps & DO_MOVEABLE)   &&
                 (usOp == (USHORT)DO_MOVE)))
            {

               /* Check the rendering format */
               if (DrgVerifyRMF(dragItem, "DRM_OS2FILE", "DRF_UNKNOWN"))
                  usIndicator = DOR_DROP;
               else
                  usIndicator = DOR_NEVERDROP;
            }
            else
               usIndicator = DOR_NODROPOP;
          }


[Back] [Next]