Important: The information in this document is obsolete and should not be used for new development.
ReserveEntry
Reserves or removes reservation from an entry in the currentGDevice
data structure's color table.
pascal void ReserveEntry ( short index, Boolean reserve);
index
- The index to the entry.
reserve
- A Boolean value:
true
to reserve the entry,false
to remove the reservation.DISCUSSION
TheReserveEntry
function reserves or removes the reservation of an entry in the current color table, depending on the value of thereserve
parameter. A reserved entry cannot be matched by another application's search function, andColor2Index
(or other functions that depend on it such asRGBForeColor
,RGBBackColor
, andSetCPixel
) never return that entry to another client. You could use this function to selectively protect a color for color table animation.The
ReserveEntry
function copies the low byte of thegdID
field of the currentGDevice
data structure into the low byte of theColorSpec.value
field of the color table when reserving an entry, and leaves the high byte alone.ReserveEntry
acts like selective protection and does not allow any changes if the currentgdID
field is different than the one in theColorSpec.value
field of the reserved entry. If a requested match is already reserved,ReserveEntry
returns a protection error. It can remove reservation from any entry.