[DCC Error] GIFImage.pas(4584): E2064 Left side cannot be assigned to
这个错误怎样解决?
=========================================================================
tagPALETTEENTRY = packed record
peRed: Byte;
peGreen: Byte;
peBlue: Byte;
peFlags: Byte;
end;
TPaletteEntry = tagPALETTEENTRY;
------------------
PMaxLogPalette = ^TMaxLogPalette; // not in Windows Headers
TMaxLogPalette = packed record
palVersion: Word;
palNumEntries: Word;
palPalEntry: array [Byte] of TPaletteEntry;
end;
----------------------
function GrayScalePalette: hPalette;
var
i :integer;
Pal : TMaxLogPalette;
begin
Pal.palVersion := $0300;
Pal.palNumEntries := 256;
for i := 0 to 255 do
begin
with (Pal.palPalEntry[i]) do
begin
peRed := i;//this is an error
peGreen := i;//this is an error
peBlue := i;//this is an error
peFlags := PC_NOCOLLAPSE;//this is an error
end;
end;
Result := CreatePalette(pLogPalette(@Pal)^);
end;
------解决方案--------------------------------------------------------
左边的对象(变量)不能被赋值。