unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls;
type
TCategoryPanelGroup=Class(ExtCtrls.TCategoryPanelGroup)
procedure WMPaint(
var Message: TWMPaint);
message WM_PAINT;
End;
TForm2 =
class(TForm)
CategoryPanelGroup1: TCategoryPanelGroup;
CategoryPanel1: TCategoryPanel;
CategoryPanel2: TCategoryPanel;
Image1: TImage;
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
procedure TCategoryPanelGroup.WMPaint(
var Message: TWMPaint);
var
aRect: TRect;
aCanvas: TCanvas;
begin
aCanvas := TCanvas.Create;
try
aCanvas.Handle := GetDC(
handle);
aCanvas.Brush.Color := clLime;
aCanvas.Draw(0,0,Form2.Image1.picture.Bitmap);
ReleaseDC(
handle,aCanvas.Handle)
finally
aCanvas.Free;
end;
end;
end.