DrgQueryDragitemPtr: Difference between revisions
Appearance
Created page with "This function returns a pointer to the DRAGITEM structure used in the direct manipulation operation. ==Syntax== DrgQueryDragitemPtr(pdinfo, ulIndex) ==Parameters== ;pdinfo (PDRAGINFO) - input: Pointer to the DRAGINFO structure from which the DRAGITEM structure is obtained. ;ulIndex (ULONG) - input: Zero-based index of the DRAGITEM structure for which the pointer is to be returned. ==Returns== ;Dragitem (PDRAGITEM) - returns: Pointer to the DRAGITEM struct..." |
|||
| Line 9: | Line 9: | ||
==Returns== | ==Returns== | ||
;Dragitem ( | ;Dragitem (PDRAGITEM) - returns: Pointer to the DRAGITEM structure. | ||
==Remarks== | ==Remarks== | ||
Latest revision as of 23:26, 7 April 2025
This function returns a pointer to the DRAGITEM structure used in the direct manipulation operation.
Syntax
DrgQueryDragitemPtr(pdinfo, ulIndex)
Parameters
- pdinfo (PDRAGINFO) - input
- Pointer to the DRAGINFO structure from which the DRAGITEM structure is obtained.
- ulIndex (ULONG) - input
- Zero-based index of the DRAGITEM structure for which the pointer is to be returned.
Returns
- Dragitem (PDRAGITEM) - returns
- Pointer to the DRAGITEM structure.
Remarks
This function returns a pointer to ulItemID in the DRAGITEM structure used in the direct manipulation operation.
Example Code
#define INCL_WINSTDDRAG /* Direct Manipulation (Drag) Functions */
#include <os2.h>
PDRAGITEM pDragitem; /* DRAGITEM structure pointer */
DRAGINFO Draginfo; /* DRAGINFO structure from which the */
/* DRAGITEM structure is obtained */
ULONG ulIndex; /* Zero-based index of the DRAGITEM */
/* structure pointer to be returned */
HWND hwndSource;/* Source window handle for the drag */
USHORT usn = 0; /* Return pointer to first DRAGITEM */
pDragitem = DrgQueryDragitemPtr(&Draginfo,usn);
hwndSource = pDragitem->hwndItem; /* Obtain source window handle */