Meh, this is how I do it:
SCAR Code:
function SmartDrawBitmap(BMP, x, y: Integer): Boolean;
var
SmartCan: TCanvas;
begin
if not SmartActive then Exit;
try
SmartCan := GetBitmapCanvas(BMP);
SmartCan.Handle := SmartGetDebugDC;
SafeDrawBitmap(BMP, SmartCan, x, y);
Result := True;
except
Result := False;
end;
end;
function SmartClearCanvas: Boolean;
var
BMP: Integer;
begin
if not SmartActive then Exit;
try
BMP := BitmapFromString(765, 503, '');
Result := SmartDrawBitmap(BMP, 0, 0);
except
Result := False;
finally
FreeBitmap(BMP);
end;
end;