Jump to content

wpDragCell

From EDM2
Revision as of 02:06, 17 November 2025 by Martini (talk | contribs)

This instance method is called to drag-apply a value in a cell.

Syntax

_wpDragCell(somSelf, pCell, hwndPal, ptlDrag)

Parameters

somSelf (WPPalette *) - input
Pointer to the object on which the method is being invoked.
Points to an object of class WPPalette.
pCell (PCELL) - input
Pointer to the **CELL** structure to be dragged.
hwndPal (HWND) - input
Palette window handle.
ptlDrag (PPOINTL) - input
Pointer in *hwndPal* coordinates from which drag was initiated.

Returns

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

How to Override

This method should be overridden to handle the drag-apply action. Override processing should include capturing the mouse and waiting for and processing the `WM_ENDDRAG` message.

Usage

This method is generally called only by the palette window after it receives the `WM_BEGINDRAG` message.

Example Code

#define INCL_WINWORKPLACE
#include <os2.h>

WPPalette *somSelf; /* Pointer to the object on which the method is being invoked. */
PCELL *pCell; /* Pointer to the CELL structure to be dragged. */
HWND hwndPal; /* Palette window handle. */
PPOINTL *ptlDrag; /* Pointer in hwndPal coordinates from which drag was initiated. */
BOOL rc; /* Success indicator. */

rc = _wpDragCell(somSelf, pCell, hwndPal,
        ptlDrag);

Remarks

The default processing for this method by the WPPalette class is to do nothing other than return **FALSE**.

Related Methods

This method is not covered in the provided text.