Jump to content

DrgPushDraginfo

From EDM2
Revision as of 00:20, 8 April 2025 by Iturbide (talk | contribs) (Created page with "This function gives a process access to a DRAGINFO structure. ==Syntax== DrgPushDraginfo(pdinfo, hwndDest) ==Parameters== ;pdinfo (PDRAGINFO) - input: Pointer to the DRAGINFO structure. ;hwndDest (HWND) - input: Handle of the window whose process is to be given access to a DRAGINFO structure. ==Returns== ;rc (BOOL) - returns: Success indicator. :: TRUE - Successful completion. :: FALSE - Error occurred. ==Remarks== The receiving process is responsible for: #...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This function gives a process access to a DRAGINFO structure.

Syntax

DrgPushDraginfo(pdinfo, hwndDest)

Parameters

pdinfo (PDRAGINFO) - input
Pointer to the DRAGINFO structure.
hwndDest (HWND) - input
Handle of the window whose process is to be given access to a DRAGINFO structure.

Returns

rc (BOOL) - returns
Success indicator.
TRUE - Successful completion.
FALSE - Error occurred.

Remarks

The receiving process is responsible for:

  1. Deleting the string handles in the DRAGINFO structure with DrgDeleteDraginfoStrHandles
  2. Freeing the DRAGINFO structure using DrgFreeDraginfo.

Errors

Possible returns from WinGetLastError:

PMERR_ACCESS_DENIED (0x150D)
The memory block was not allocated properly.
PMERR_INSUFFICIENT_MEMORY (0x203E)
The operation terminated through insufficient memory.

Example Code

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

BOOL     fSuccess; /* Indicate success or failure */
DRAGINFO Draginfo; /* Pointer to DRAGINFO structure */
HWND     hwndDest; /* Handle of window whose process will */
                    /* will be given access to the DRAGINFO */
                    /* structure                       */

fSuccess = DrgPushDraginfo(&Draginfo,hwndDest);

Related Functions