//看一下吧.<br>procedure TForm1.Button1Click(Sender: TObject);<br>var<br> ARect : TRect;<br> nRow : Integer;<br>Const<br> STR = 'ABC'+#13+<br> 'ABC'+#13+<br> 'ABC'+#13+<br> 'ABC'+#13+<br> 'ABC';<br>begin<br> ARect := Rect(10,10,100,100);<br> with Canvas do<br> begin<br> DrawText(Handle, STR, Length(STR), ARect, DT_WORDBREAK);<br> DrawText(Handle, STR, Length(STR), ARect, DT_CALCRECT or DT_SINGLELINE);<br> nRow := ARect.Bottom - ARect.Top;<br> DrawText(Handle, STR, Length(STR), ARect, DT_CALCRECT or DT_WORDBREAK);<br> if nRow > 0 then<br> begin<br> ShowMessage(IntToStr((ARect.Bottom - ARect.Top) div nRow));<br> end;<br> end;<br>end;