Das ist nicht so ganz was ich vorgeschlagen hatte. Auch bei diesem Code wird ein 4-Byte-LongBool in einen 1-Byte-Boolean konvertiert - ob der nun im Debugger dargestellt oder in einem
if not
abgefragt wird. Wenn bei der Konvertierung nur das niedrige Byte berücksichtigt wird kann das auch mal schiefgehen.
Versuch doch mal dies:
Delphi-Quellcode:
var
LB: LongBool;
begin
lb := BitBlt(TargetCanvas.Handle, CellRect.Left+1, CellRect.Top+1, CellRect.Width-2, CellRect.Height-2, T.picture.Bitmap.Handle, 0, 0, SRCCOPY);
if LongInt(LB) <> 0 then
.
.
Am Ende ist für die
WinApi ein BOOL immer noch eine Zahl.