DrgQueryDragitem
Appearance
This function returns a DRAGITEM structure used in the direct manipulation operation.
Syntax
DrgQueryDragitem(pdinfo, cbBuffer, pditem, iItem)
Parameters
- pdinfo (PDRAGINFO) - input
- Pointer to the DRAGINFO structure from which the DRAGITEM structure is obtained.
- cbBuffer (ULONG) - input
- Maximum number of bytes to copy to the buffer.
- pditem (PDRAGITEM) - output
- Pointer to the buffer into which the DRAGITEM structure is copied.
- iItem (ULONG) - input
- Zero-based index of the DRAGITEM to be returned.
Returns
- rc (BOOL) - returns
- Success indicator.
- TRUE - Successful completion.
- FALSE - Error occurred.
Remarks
This function returns the DRAGITEM structure identified by iItem.
Example Code
#define INCL_WINSTDDRAG /* Direct Manipulation (Drag) Functions */ #include <os2.h> BOOL fSuccess; /* Indicate success or failure */ DRAGINFO Draginfo; /* DRAGINFO structure from which the */ /* DRAGITEM structure is obtained */ ULONG cbBuffer; /* Maximum number of bytes to copy */ DRAGITEM Dragitem; /* Buffer into which the DRAGITEM */ /* structure is copied */ ULONG iItem; /* Zero-based index of the DRAGITEM */ /* to be returned */ HWND hwndSource;/* Source window handle for the drag */ cbBuffer = sizeof(DRAGITEM); /* Copy entire DRAGITEM structure */ iItem = 0; /* Return first DRAGITEM */ fSuccess = DrgQueryDragitem(&Draginfo,cbBuffer,&Dragitem,iItem); hwndSource = Dragitem.hwndItem; /* Obtain source window handle */