The following code fragment shows how to initialize the DRAGITEM array:
/***********************************************************************/ /* Get our current directory for the container name. */ /***********************************************************************/ dirlen = CCHMAXPATH-1; DosQueryCurrentDir(0, szDir, &dirlen); sprintf(szContainer, "\\%s\\", szDir); hstrContainer = DrgAddStrHandle(szContainer); Dragitem.hwndItem = hListWnd; Dragitem.hstrType = hstrType; Dragitem.hstrRMF = hstrRMF; Dragitem.hstrContainerName = hstrContainer; Dragitem.fsControl = 0; Dragitem.fsSupportedOps = DO_COPYABLE | DO_MOVEABLE; Dragitem.hstrSourceName = DrgAddStrHandle (szBuffer); Dragitem.hstrTargetName = Dragitem.hstrSourceName; Dragitem.ulItemID = index; /***********************************************************************/ /* Set info, prepare for drag. */ /***********************************************************************/ DrgSetDragitem(pSourceDraginfo, &Dragitem, sizeof(DRAGITEM), 0);