Moin Matti,
ein Stück weiter gekommen bin ich ja.
Schau's Dir doch mal an, ob es weiterhilft.
Delphi-Quellcode:
procedure TForm1.WMNCPAINT(
var Msg: TWMNCPaint);
const
DCX_USESTYLE = $10000;
var
aCanvas: TCanvas;
begin
inherited;
aCanvas := TCanvas.Create;
try
aCanvas.Handle := GetDCEx(self.Handle,Msg.RGN,DCX_WINDOW
or DCX_INTERSECTRGN
or DCX_USESTYLE);
aCanvas.Pen.Color := clLime;
aCanvas.Brush.Style := bsFDiagonal
{bsSolid};
aCanvas.Brush.Color := clBlack;
aCanvas.Rectangle(0, 0, Width, Height);
Msg.Result := 0;
finally
ReleaseDC(
Handle, aCanvas.Handle);
aCanvas.Free;
end;
end;
procedure TForm1.WMPAINT(
var Msg: TWMPaint);
var
aCanvas : TCanvas;
begin
inherited;
aCanvas := TCanvas.Create;
try
aCanvas.Handle := Msg.DC;
aCanvas.Pen.Color := clBtnFace;
self.DoubleBuffered := true;
finally
aCanvas.Free;
end;
Msg.Result := 1;
end;