procedure HandleCTLColorEdit(var Msg: TWMCTLCOLOREDIT);message WM_CTLCOLOREDIT;
procedure TForm1.Button2Click(Sender: TObject);
var
BMP: TBitmap;
begin
BMP := TBitmap.Create;
BMP.LoadFromFile('C:\Documents and Settings\Administrator\桌面\未命名.bmp');
Memo1.Brush.Bitmap := BMP;
Memo1.Repaint;
Bmp.Free;
end;
procedure TForm1.HandleCTLColorEdit(var Msg: TWMCTLCOLOREDIT);
begin
if Msg.ChildWnd = Memo1.Handle then begin
SetBkMode(Msg.ChildDC, TRANSPARENT);
Msg.Result := Memo1.Brush.Handle;
end;
end;