Important: The information in this document is obsolete and should not be used for new development.
RestoreEntries
Sets a selection of color table entries.
pascal void RestoreEntries ( CTabHandle srcTable, CTabHandle dstTable, ReqListRec *selection);
srcTable
- The color table containing entries to be restored.
dstTable
- The color table in which to restore the entries.
selection
- A pointer to a list of entries to be restored, as indicated not by a range of indexes, but by a request list structure. See
ReqListRec
data structure (page 5-5)DISCUSSION
TheRestoreEntries
function sets a selection of color table entries from thesrcTable
parameter into thedstTable
parameter, but doesn't rebuild the inverse table. You use theselection
parameter, aReqListRec
data structure (page 5-5), to enumerate entries from thedstTable
parameter. The values specified by theselection
parameter are offsets into thesrcTable
data structure, not the contents of theColorSpec.value
field.If a request is beyond the end of the destination color table,
RestoreEntries
sets that position in therequestList
data structure tocolReqErr
, and returns an error.RestoreEntries
assumes that the color table specified by thesrcTable
parameter and the request list specified by theselection
parameter have the same number of entries.If
dstTbl
isNULL
, or points to the currentGDevice
data structure's color table,RestoreEntries
changes the device's color table and the hardware CLUT to these new colors.RestoreEntries
does not change the color table's seed, so no invalidation occurs (which may causeRGBForeColor
to act strangely).RestoreEntries
ignores protection and reservation of color table entries.SPECIAL CONSIDERATIONS
You generally should use the Palette Manager to give your application its own set of colors; use ofRestoreEntries
should be limited to special-purpose applications.RestoreEntries
allows you to change a color table without changing itsctSeed
field. You can execute the application code and then useRestoreEntries
to put the original colors back in. However, in some cases things in the background may appear in the wrong colors, since they were never redrawn. To void this, your application must build its own new inverse table and redraw the background. If you then useRestoreEntries
, you should call theCTabChanged
function to clean up correctly.