DrgAllocDraginfo - Example Code

This example calls the DrgAllocDraginfo function to create a Drag structure for a single object and uses the new structure to set the DRAGITEM (DrgSetDragitem) structure.

#define INCL_WINSTDDRAG  /* Direct Manipulation (Drag) Functions */
#include <os2.h>

PDRAGINFO  pdinfo;       /* Pointer to DRAGINFO structure        */
HWND       hwnd;         /* Handle of calling (source) window    */
BOOL       flResult;     /* Result indicator                     */
DRAGITEM   ditem;        /* DRAGITEM structure                   */

pdinfo = DrgAllocDraginfo(1); /* Create the DRAGINFO structure   */
                              /* Set the drag item               */
flResult= DrgSetDragitem(pdinfo, &ditem, (ULONG)sizeof(ditem), 0);


[Back: DrgAllocDraginfo - Related Functions]
[Next: DrgAllocDraginfo - Topics]