Leigh,
as I said, there's way too much code to post on a mailing list.
However, the essentials are:
type
THack = class(TWinControl); // to give you access to the PaintControls
method
procedure PaintBackground(Control : TWinControl; DC : HDC)
var
P : TPoint;
Save : integer;
begin
if assigned(Control) and assigned(Control.Parent) then
begin
Save := SaveDC(DC);
try
P := Control.ClientOrigin;
ScreenToClient(Control.Parent.Handle,P);
MoveWindowOrg(DC,-P.X,-P.Y);
SendMessage(Control.Parent.Handle,WM_ERASEBKGND,DC,0);
THack(Control.Parent).PaintControls(DC,nil);
finally
RestoreDC(DC,Save);
end;
end;
end;
You need to call this with the DC set to what you get in the WM_ERASEBKGND
method, and the control set to the one that is going to provide your
background.
HTH
Trevor
----- Original Message -----
From: "Leigh Wanstead" <[EMAIL PROTECTED]>
To: "Trevor Jones" <[EMAIL PROTECTED]>; "NZ Borland Developers
Group -Delphi List" <[EMAIL PROTECTED]>
Sent: Tuesday, June 01, 2004 3:42 PM
Subject: RE: [DUG] Floating Object
> Hi Trevor,
>
> How about you post your code on this list? I am interested to know too.
>
> Regards
> Leigh
>
_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi