当前位置: 代码迷 >> Delphi >> error message as follow,该如何解决
  详细解决方案

error message as follow,该如何解决

热度:5959   发布时间:2013-02-25 00:00:00.0
error message as follow
[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;

------解决方案--------------------------------------------------------
左边的对象(变量)不能被赋值。
  相关解决方案