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
ReqListRecdata structure (page 5-5)DISCUSSION
TheRestoreEntriesfunction sets a selection of color table entries from thesrcTableparameter into thedstTableparameter, but doesn't rebuild the inverse table. You use theselectionparameter, aReqListRecdata structure (page 5-5), to enumerate entries from thedstTableparameter. The values specified by theselectionparameter are offsets into thesrcTabledata structure, not the contents of theColorSpec.valuefield.If a request is beyond the end of the destination color table,
RestoreEntriessets that position in therequestListdata structure tocolReqErr, and returns an error.RestoreEntriesassumes that the color table specified by thesrcTableparameter and the request list specified by theselectionparameter have the same number of entries.If
dstTblisNULL, or points to the currentGDevicedata structure's color table,RestoreEntrieschanges the device's color table and the hardware CLUT to these new colors.RestoreEntriesdoes not change the color table's seed, so no invalidation occurs (which may causeRGBForeColorto act strangely).RestoreEntriesignores 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 ofRestoreEntriesshould be limited to special-purpose applications.RestoreEntriesallows you to change a color table without changing itsctSeedfield. You can execute the application code and then useRestoreEntriesto 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 theCTabChangedfunction to clean up correctly.
 
  
  
 