Jump to content

wpPaintCell

From EDM2
Revision as of 02:46, 17 November 2025 by Martini (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This instance method is called to paint a cell.

Syntax

wpPaintCell(somSelf, pCell, hps, prcl, fHilite)

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 painted.
hps (HPS) - input
Presentation space handle for the cell.
prcl (PRECTL) - input
Pointer to the **RECTL** structure for the area to be painted.
fHilite (BOOL) - input
Flag to indicate selected state.
  • **TRUE** Cell is currently selected.
  • **FALSE** Cell is not currently selected.

Returns

There is no return value for this method.

How to Override

This method should be overridden by all subclasses that want to display visual information in the cell window. It is recommended that the parent method be called first.

Usage

This method can be called at any time in order to paint a cell.

Remarks

The default processing for this method by the WPPalette class is to paint a **SYSCLR_WINDOW** background. If the cell is highlighted, a **SYSCLR_HIGHLITEBACKGROUND** background is painted.

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 painted. */
HPS hps; /* Presentation space handle for the cell. */
PRECTL *prcl; /* Pointer to the RECTL structure for the area to be painted. */
BOOL fHilite; /* Flag to indicate selected state. */

wpPaintCell(somSelf, pCell, hps, prcl, fHilite);