我自己试了一下,总出现以下错误 [dcc32 错误] mphexeditor.pas(5792): E2064 Left side cannot be assigned to
function TCustomMPHexEditor.ShowDragCell(const X, Y: integer): integer; var LIntDragPos, LIntMouseX, LIntMouseY: integer; begin with MouseCoord(X, Y) do begin LIntMouseX := X; LIntMouseY := Y; if X < GRID_FIXED then X := GRID_FIXED; //此行报错,这个引用到了Vcl.Grids if Y >= RowCount then Y := RowCount - 1; if Y < GRID_FIXED then Y := GRID_FIXED; LIntDragPos := GetPosAtCursor(X, Y) end;
----------------------------------------------
-
这段代码用with就是累死人的节奏,改成这样试试: function TCustomMPHexEditor.ShowDragCell(const X, Y: integer): integer; var coord: TGridCoord; LIntDragPos, LIntMouseX, LIntMouseY: integer; begin coord := MouseCoord(X, Y); with coord do begin LIntMouseX := X; LIntMouseY := Y; if X < GRID_FIXED then X := GRID_FIXED; //此行报错,这个引用到了Vcl.Grids if Y >= RowCount then Y := RowCount - 1; if Y < GRID_FIXED then Y := GRID_FIXED; LIntDragPos := GetPosAtCursor(X, Y) end;
procedure TranslateBufferFromAnsi(const TType: TMPHTranslationKind; aBuffer: PChar; bBuffer: PAnsiChar; const aCount: integer); var LIntLoop: integer; begin case TType of // changed 04/18/04: bBuffer and aBuffer were interchanged! tkAsIs: Move(aBuffer^, bBuffer^, aCount); tkDOS8, tkASCII: CharToOEMBuff(aBuffer, bBuffer, aCount); tkMAC: if aCount > 0 then for LIntLoop := 0 to Pred(aCount) do bBuffer[LIntLoop] := MPH_CCONV_MAC[cctFromAnsi][Ord(aBuffer[LIntLoop])]; //此行报[dcc32 错误] mphexeditor.pas(2164): E2010 Incompatible types: 'AnsiChar' and 'Char' tkBCD: if aCount > 0 then for LIntLoop := 0 to Pred(aCount) do bBuffer[LIntLoop] :=
[cctFromAnsi][Ord(aBuffer[LIntLoop])]; //此行报[dcc32 错误] mphexeditor.pas(2168): E2010 Incompatible types: 'AnsiChar' and 'Char'
tkCustom: if aCount > 0 then for LIntLoop := 0 to Pred(aCount) do bBuffer[LIntLoop] := MPHCustomCharConv[cctFromAnsi][Ord(aBuffer[LIntLoop])]; //此行报[dcc32 错误] mphexeditor.pas(2173): E2010 Incompatible types: 'AnsiChar' and 'Char'