Jump to content

WpDragCell: Difference between revisions

From EDM2
Created page with "{{DISPLAYTITLE:wpDragCell}} 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..."
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 10: Line 10:
:Points to an object of class [[WPPalette]].
:Points to an object of class [[WPPalette]].


;''pCell'' ([[PCELL]]) - input
;''pCell'' (P[[CELL]]) - input
:Pointer to the **CELL** structure to be dragged.
:Pointer to the **CELL** structure to be dragged.


Line 30: Line 30:
==Usage==
==Usage==
This method is generally called only by the palette window after it receives the `WM_BEGINDRAG` message.
This method is generally called only by the palette window after it receives the `WM_BEGINDRAG` message.
== Remarks ==
The default processing for this method by the [[WPPalette]] class is to do nothing other than return **FALSE**.


==Example Code==
==Example Code==
Line 45: Line 48:
         ptlDrag);
         ptlDrag);
</PRE>
</PRE>
== 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.


[[Category:Workplace Instance Methods]]
[[Category:Workplace Instance Methods]]

Latest revision as of 02:07, 17 November 2025

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.

Remarks

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

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);