//声明:
ExtTextOut(
  DC: HDC;          {设备环境句柄}
  X, Y: Integer;    {起点坐标}
  Options: Longint; {选项}
  Rect: PRect;      {指定显示范围; 0 表示限制范围}
  Str: PChar;       {字符串指针}
  Count: Longint;   {字符串长度}
  Dx: PInteger      {表示字符间距的数组; 是可选值}
): BOOL;

//Options 参数可选值:
ETO_OPAQUE         = 2;     {输出前, 用当前背景色填充矩形}
ETO_CLIPPED        = 4;     {剪切输出, 只输出矩形范围内的文本}
ETO_GLYPH_INDEX    = $10;   {}
ETO_RTLREADING     = $80;   {}
ETO_NUMERICSLOCAL  = $400;  {}
ETO_NUMERICSLATIN  = $800;  {}
ETO_IGNORELANGUAGE = $1000; {}
ETO_PDY            = $2000; {}

//举例: procedure TForm1.FormPaint(Sender: TObject); var MyRect: TRect; const str = 'Delphi'; arr: array[0..4] of Integer = (10,20,30,40,50); begin MyRect := Rect(10,10,200,200); ExtTextOut(Canvas.Handle, 50, 50, ETO_CLIPPED, @MyRect, str, Length(str), @arr); end;
//效果图:

posted on 2008-02-08 16:50  万一  阅读(10537)  评论(5编辑  收藏  举报