随笔 - 279  文章 - 0 评论 - 27 trackbacks - 0

procedure TForm1.btn1Click(Sender: TObject);
var
  c:TCanvas;
begin
  c:= TCanvas.Create;
  c.Pen.Width  := 5;
  c.Font.Size := 20;
  c.Font.Name := '微软雅黑';
  c.Font.Color := clRed;
  c.Brush.Color := clBlack;
  try
    //c.Handle := GetDC(0);
    c.Handle := GetWindowDC(1181728); // 这句是在一个指定窗体上写字
    c.TextOut(20,20,'曲终的BLOG');
  finally
    c.Free;
  end;
end;
posted on 2010-09-14 10:43  °ι 、曲 终  阅读(209)  评论(0编辑  收藏