This example calls the DrgAllocDragtransfer function to allocate a single DRAGTRANSFER structure and adds a pointer to a DRAGITEM structure for an object that will be transferred.
#define INCL_WINSTDDRAG /* Direct Manipulation (Drag) Functions*/ #include <os2.h> PDRAGTRANSFER pResult; /* Pointer to DRAGTRANSFER structure */ PDRAGITEM pDragitem; /* Pointer to DRAGITEM structure */ pResult = DrgAllocDragtransfer(1); if (pResult != NULL) /* Indicate DRAGITEM to be transferred */ pResult->pditem = pDragitem;