wpRestoreCellData
Appearance
This method is specific to version 3, or higher, of the OS/2 operating system.
This instance method restores the data for the specified cell.
Syntax
_wpRestoreCellData(somSelf, pCell, ulIndex, ulCellSize)
Parameters
- somSelf (WPPalette *) - input
- Pointer to the object on which the method is being invoked.
- Points to an object of class WPPalette.
- pCell (PCELL *) - in/out
- Pointer to the cell whose data is to be restored.
- ulIndex (ULONG) - input
- Cell index. This is the number of the cell. It must be within the range **0** to **xCellCount*yCellCount-1**.
- ulCellSize (ULONG) - input
- Number of bytes to be allocated for the cell. If **0** is specified, the system allocates enough space to hold the saved data.
Returns
- rc (BOOL) - returns
- Success indicator.
- TRUE Successful completion.
- FALSE Error occurred.
How to Override
This method **must** be overridden by all subclasses that wish to save and restore part of their cell data. It should be overridden when special processing is to be done for subclassed palettes. This method **must** be overridden by all subclasses that change the size of their cell data. For example, the scheme palette saves the name of the background bitmap for the scheme.
Usage
This method is called by the system while it is processing wpSaveState for WPPalette.
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 whose data is to be restored. */
ULONG ulIndex; /* Cell index. */
ULONG ulCellSize; /* Number of bytes to be allocated for the cell. */
BOOL rc; /* Success indicator. */
rc = _wpRestoreCellData(somSelf, pCell, ulIndex,
ulCellSize);