ms99
asked on
Points for ptmcomp: Why setClassLong isn't working
Hi, ptmComp. Please post the same answer you gave to my othe question and I'll give you the points.
In Delphi 5 I'm using setClassLong to replace the window class background brush but it's not working. I tried with a solid brush and a bitmap brush.
var
brushBackGround : HBrush;
bm:graphics.tbitmap;
begin
bm := graphics.TBitmap.create;
try
bm.loadFromFile('patron1.b mp');
// brushBackGround := createPatternBrush(bm.hand le);
brushBackGround := createSolidBrush(clRed);
setClassLong(application.h andle,GCL_ HBrBackGro und,brushB ackGround) ;
try
Application.Initialize;
Application.CreateForm(TFo rm1, Form1); // form1 is an empty form
// setClassLong(form1.handle, GCL_HBrBac kGround,br ushBackGro und); tried this, didn't work neither
Application.Run;
finally
deleteObject(brushBackGrou nd);
end;
finally
bm.Free;
end;
end.
In Delphi 5 I'm using setClassLong to replace the window class background brush but it's not working. I tried with a solid brush and a bitmap brush.
var
brushBackGround : HBrush;
bm:graphics.tbitmap;
begin
bm := graphics.TBitmap.create;
try
bm.loadFromFile('patron1.b
// brushBackGround := createPatternBrush(bm.hand
brushBackGround := createSolidBrush(clRed);
setClassLong(application.h
try
Application.Initialize;
Application.CreateForm(TFo
// setClassLong(form1.handle,
Application.Run;
finally
deleteObject(brushBackGrou
end;
finally
bm.Free;
end;
end.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.